From d225d0a8a16e362ddb14cb93c124eb06cf0ff05e Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 22 Dec 2011 01:16:12 +0100 Subject: GLJPanel: Fix dispose of backend (J2DOGL thread, no double dispose).., GLJPanel: - fix dispose of backend - proper J2DOGL thread - no double dispose - remove VERBOSE - no dispose regenerate flag - add @Overrride - more safe createContext(..) impl - setSynchronized(true); for all backends - ensure AbstractGraphicsDevice close() is being called GLDrawableHelper: - Clarify w/ isDisposeAction = null==initAction GLPbufferImpl: - ensure AbstractGraphicsDevice close() is being called Java2D: - remove VERBOSE - --- src/jogl/classes/javax/media/opengl/awt/GLCanvas.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/jogl/classes/javax/media/opengl/awt/GLCanvas.java') diff --git a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java index e909416d9..1b234ef3a 100644 --- a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java +++ b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java @@ -466,6 +466,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing animator.resume(); } } + if(!regenerate) { disposeAbstractGraphicsDevice(); } @@ -887,7 +888,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing } else { adeviceMsg = null; } - boolean closed = awtConfig.getScreen().getDevice().close(); + boolean closed = adevice.close(); if(DEBUG) { System.err.println(Thread.currentThread().getName() + " - GLCanvas.dispose(false): closed GraphicsDevice: "+adeviceMsg+", result: "+closed); } -- cgit v1.2.3