浏览代码

Fixed GL setRenderZone (#471)

Pascal Peridont 6 年之前
父节点
当前提交
647b3d42d5
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      h3d/impl/GlDriver.hx

+ 3 - 2
h3d/impl/GlDriver.hx

@@ -1355,8 +1355,9 @@ class GlDriver extends Driver {
 			gl.disable(GL.SCISSOR_TEST);
 		else {
 			gl.enable(GL.SCISSOR_TEST);
-			var th = curTarget == null ? bufferHeight : curTarget.height;
-			gl.scissor(x, th - (y + height), width, height);
+			if( curTarget == null )
+				y = bufferHeight - (y + height);
+			gl.scissor(x, y, width, height);
 		}
 	}