Recalculate projmodelview matrix at the end of flush.

This commit is contained in:
codeanticode
2012-06-21 14:17:36 +00:00
parent baecfffc7e
commit 80ac5f856c

View File

@@ -1659,7 +1659,7 @@ public class PGraphicsOpenGL extends PGraphics {
}
popFramebuffer();
pgl.endOffscreenDraw(pgPrimary.clearColorBuffer0);
pgPrimary.restoreGL();
@@ -2387,6 +2387,7 @@ public class PGraphicsOpenGL extends PGraphics {
if (flushMode == FLUSH_WHEN_FULL && !hints[DISABLE_TRANSFORM_CACHE]) {
modelview = modelview0;
modelviewInv = modelviewInv0;
calcProjmodelview();
}
}
@@ -3549,7 +3550,7 @@ public class PGraphicsOpenGL extends PGraphics {
cameraInv.reset();
}
public void applyMatrix(PMatrix2D source) {
applyMatrixImpl(source.m00, source.m01, 0, source.m02,
source.m10, source.m11, 0, source.m12,
@@ -4696,7 +4697,7 @@ public class PGraphicsOpenGL extends PGraphics {
protected void backgroundImpl() {
flush();
pgl.glDepthMask(true);
pgl.glClearDepth(1);
pgl.glClear(PGL.GL_DEPTH_BUFFER_BIT);
@@ -4705,12 +4706,12 @@ public class PGraphicsOpenGL extends PGraphics {
} else {
pgl.glDepthMask(true);
}
pgl.glClearColor(backgroundR, backgroundG, backgroundB, backgroundA);
pgl.glClear(PGL.GL_COLOR_BUFFER_BIT);
if (0 < parent.frameCount) {
clearColorBuffer = true;
}
}
}