Browse Source

Fixed GL setRenderZone (#471)

Pascal Peridont 6 years ago
parent
commit
647b3d42d5
1 changed files with 3 additions and 2 deletions
  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);
 		}
 	}