v0.4.2: reintroduced scissoring, now only used when its needed

This commit is contained in:
Evan Debenham
2016-09-08 20:13:40 -04:00
parent 275dcf8863
commit 23ac0135f3
4 changed files with 22 additions and 5 deletions

View File

@@ -179,6 +179,17 @@ public class NoosaScript extends Script {
if (camera != lastCamera && camera.matrix != null) {
lastCamera = camera;
uCamera.valueM4( camera.matrix );
if (!camera.fullScreen) {
GLES20.glEnable( GLES20.GL_SCISSOR_TEST );
GLES20.glScissor(
camera.x,
Game.height - camera.screenHeight - camera.y,
camera.screenWidth,
camera.screenHeight);
} else {
GLES20.glDisable( GLES20.GL_SCISSOR_TEST );
}
}
}