From 1138ff5a7b1962638c28d7ff5f4bce21a3776f55 Mon Sep 17 00:00:00 2001 From: codeanticode Date: Thu, 22 Oct 2015 20:37:55 -0400 Subject: [PATCH] swapBuffers() call in PGraphicsOpenGL.dispose() is not needed. --- core/src/processing/opengl/PGraphicsOpenGL.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/core/src/processing/opengl/PGraphicsOpenGL.java b/core/src/processing/opengl/PGraphicsOpenGL.java index 51390be8d..f42c0473d 100644 --- a/core/src/processing/opengl/PGraphicsOpenGL.java +++ b/core/src/processing/opengl/PGraphicsOpenGL.java @@ -604,16 +604,6 @@ public class PGraphicsOpenGL extends PGraphics { public void dispose() { // PGraphics super.dispose(); - if (primaryGraphics) { - // Swap buffers the end to make sure that no - // garbage is shown on the screen, this particularly - // affects non-interactive sketches on windows that - // render only 1 frame, so no enough rendering - // iterations have been conducted so far to properly - // initialize all the buffers. - pgl.swapBuffers(); - } - if (asyncPixelReader != null) { asyncPixelReader.dispose(); asyncPixelReader = null;