Browse Source

Fixed GL setRenderZone (#471)

Pascal Peridont 6 năm trước cách đây
mục cha
commit
647b3d42d5
1 tập tin đã thay đổi với 3 bổ sung2 xóa
  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);
 			gl.disable(GL.SCISSOR_TEST);
 		else {
 		else {
 			gl.enable(GL.SCISSOR_TEST);
 			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);
 		}
 		}
 	}
 	}