diff --git a/java/libraries/opengl/src/processing/opengl/PGraphicsOpenGL.java b/java/libraries/opengl/src/processing/opengl/PGraphicsOpenGL.java index bfdaa03dc..368a516f8 100644 --- a/java/libraries/opengl/src/processing/opengl/PGraphicsOpenGL.java +++ b/java/libraries/opengl/src/processing/opengl/PGraphicsOpenGL.java @@ -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; - } + } }