浏览代码

Fixing scissor for nvg elements.

Dario Manesku 11 年之前
父节点
当前提交
67c69d3ba2
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      examples/common/imgui/imgui.cpp

+ 6 - 1
examples/common/imgui/imgui.cpp

@@ -1031,7 +1031,12 @@ struct Imgui
 			}
 		}
 
-		nvgResetScissor(m_nvg);
+		nvgScissor(m_nvg
+				 , float(parentArea.m_scissorX)
+				 , float(parentArea.m_scissorY-1)
+				 , float(parentArea.m_scissorWidth)
+				 , float(parentArea.m_scissorHeight+1)
+				 );
 	}
 
 	bool beginArea(const char* _name, int32_t _x, int32_t _y, int32_t _width, int32_t _height, bool _enabled, int32_t _r)