Browse Source

Fix GL setRenderZone (#203)

Pascal Peridont 8 years ago
parent
commit
7fe571b90a
1 changed files with 2 additions and 1 deletions
  1. 2 1
      h3d/impl/GlDriver.hx

+ 2 - 1
h3d/impl/GlDriver.hx

@@ -840,7 +840,8 @@ 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);
-			gl.scissor(x, bufferHeight - (y + height), width, height);
+			var th = curTarget == null ? bufferHeight : curTarget.height;
+			gl.scissor(x, th - (y + height), width, height);
 		}
 		}
 	}
 	}