diff options
Diffstat (limited to 'src/com/mbien/opencl/demos/joglinterop/GLCLInteroperabilityDemo.java')
-rw-r--r-- | src/com/mbien/opencl/demos/joglinterop/GLCLInteroperabilityDemo.java | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/src/com/mbien/opencl/demos/joglinterop/GLCLInteroperabilityDemo.java b/src/com/mbien/opencl/demos/joglinterop/GLCLInteroperabilityDemo.java index 9dfaf5a..8febd4c 100644 --- a/src/com/mbien/opencl/demos/joglinterop/GLCLInteroperabilityDemo.java +++ b/src/com/mbien/opencl/demos/joglinterop/GLCLInteroperabilityDemo.java @@ -6,8 +6,6 @@ import com.mbien.opencl.CLGLContext; import com.mbien.opencl.CLKernel; import com.mbien.opencl.CLProgram; import com.sun.opengl.util.Animator; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; import java.io.IOException; import javax.media.opengl.DebugGL2; import javax.media.opengl.GL2; @@ -102,13 +100,7 @@ public class GLCLInteroperabilityDemo implements GLEventListener { usi.init(canvas); JFrame frame = new JFrame("JOGL-JOCL Interoperability Example"); - frame.addWindowListener(new WindowAdapter() { - @Override - public void windowClosed(WindowEvent e) { - deinit(); - } - - }); + frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.add(canvas); frame.setSize(width, height); @@ -262,11 +254,6 @@ public class GLCLInteroperabilityDemo implements GLEventListener { public void dispose(GLAutoDrawable drawable) { } - private void deinit() { - clContext.release(); // only for demonstration purposes, JVM will cleanup on exit anyway - System.exit(0); - } - public static void main(String[] args) { new GLCLInteroperabilityDemo(); } |