swapBuffers() call in PGraphicsOpenGL.dispose() is not needed.

This commit is contained in:
codeanticode
2015-10-22 20:37:55 -04:00
parent f411433eeb
commit 1138ff5a7b
@@ -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;