diff --git a/core/src/processing/opengl/PGL.java b/core/src/processing/opengl/PGL.java index ca4fee8f3..51cc65a78 100644 --- a/core/src/processing/opengl/PGL.java +++ b/core/src/processing/opengl/PGL.java @@ -894,6 +894,8 @@ public abstract class PGL { clearColor(r, g, b, a); clear(DEPTH_BUFFER_BIT | STENCIL_BUFFER_BIT | COLOR_BUFFER_BIT); + bindFramebufferImpl(FRAMEBUFFER, 0); + if (0 < pg.parent.frameCount) { // Copy the contents of the front and back screen buffers to the textures // of the FBO, so they are properly initialized. @@ -914,8 +916,6 @@ public abstract class PGL { COLOR_BUFFER_BIT, NEAREST); } - bindFramebufferImpl(FRAMEBUFFER, 0); - fboLayerCreated = true; }