From 6b10aaadfa580769013fe6ce2eee70983bde405f Mon Sep 17 00:00:00 2001 From: codeanticode Date: Wed, 9 Sep 2015 06:31:46 -0400 Subject: [PATCH] removing some unneeded code in GL surface --- core/src/processing/opengl/PSurfaceJOGL.java | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/core/src/processing/opengl/PSurfaceJOGL.java b/core/src/processing/opengl/PSurfaceJOGL.java index c2083c48a..41589af08 100644 --- a/core/src/processing/opengl/PSurfaceJOGL.java +++ b/core/src/processing/opengl/PSurfaceJOGL.java @@ -732,26 +732,17 @@ public class PSurfaceJOGL implements PSurface { } if (sketch.exitCalled()) { -// System.out.println("exit"); - animator.stop(); - sketch.dispose(); + sketch.dispose(); // calls stopThread(), which stops the animator. sketch.exitActual(); } } public void dispose(GLAutoDrawable drawable) { -// pgl.getGL(drawable); -// System.out.println("dispose"); sketch.dispose(); -// if (sketch.exitCalled()) { -// sketch.exitActual(); -// } } public void init(GLAutoDrawable drawable) { -// System.err.println("2. init drawable"); pgl.getGL(drawable); pgl.init(drawable); sketch.start(); -// setSize(sketchWidth, sketchHeight); int c = graphics.backgroundColor; pgl.clearColor(((c >> 16) & 0xff) / 255f, @@ -810,8 +801,8 @@ public class PSurfaceJOGL implements PSurface { @Override public void windowDestroyNotify(com.jogamp.newt.event.WindowEvent arg0) { - PSurfaceJOGL.this.sketch.dispose(); - PSurfaceJOGL.this.sketch.exitActual(); + sketch.dispose(); + sketch.exitActual(); } @Override @@ -829,7 +820,6 @@ public class PSurfaceJOGL implements PSurface { @Override public void windowResized(com.jogamp.newt.event.WindowEvent arg0) { } - }