diff --git a/android/core/src/processing/opengl/PGL.java b/android/core/src/processing/opengl/PGL.java index 14ddf2df6..8937b8818 100644 --- a/android/core/src/processing/opengl/PGL.java +++ b/android/core/src/processing/opengl/PGL.java @@ -557,6 +557,8 @@ public class PGL { public void endOnscreenDraw(boolean clear0) { if (!clear0) { + GLES20.glDisable(GLES20.GL_BLEND); + // We are in the primary surface, and no clear mode, this means that the current // contents of the front buffer needs to be used in the next frame as the background. GLES20.glBindFramebuffer(GLES20.GL_FRAMEBUFFER, 0); diff --git a/java/libraries/opengl/src/processing/opengl/PGL.java b/java/libraries/opengl/src/processing/opengl/PGL.java index a02151d4f..68d22211b 100644 --- a/java/libraries/opengl/src/processing/opengl/PGL.java +++ b/java/libraries/opengl/src/processing/opengl/PGL.java @@ -758,13 +758,15 @@ public class PGL { public void endOnscreenDraw(boolean clear0) { if (colorFBO[0] != 0) { + gl.glDisable(GL.GL_BLEND); + // Blit the contents of the multisampled FBO into the color FBO: gl.glBindFramebuffer(GL2.GL_READ_FRAMEBUFFER, multiFBO[0]); gl.glBindFramebuffer(GL2.GL_DRAW_FRAMEBUFFER, colorFBO[0]); gl2x.glBlitFramebuffer(0, 0, fboWidth, fboHeight, 0, 0, fboWidth, fboHeight, GL.GL_COLOR_BUFFER_BIT, GL.GL_NEAREST); - + // And finally write the color texture to the screen. gl.glBindFramebuffer(GL.GL_FRAMEBUFFER, 0); gl.glClearDepth(1);