Explorar o código

Fixed GL setRenderZone (#471)

Pascal Peridont %!s(int64=6) %!d(string=hai) anos
pai
achega
647b3d42d5
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  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);
 		}
 	}