diff options
Diffstat (limited to 'src/jogl/classes/javax/media/opengl/awt')
-rw-r--r-- | src/jogl/classes/javax/media/opengl/awt/GLJPanel.java | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java index c8bfe94d8..18ebcd129 100644 --- a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java +++ b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java @@ -255,6 +255,19 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable { drawableHelper.invokeGL(disposeDrawable, disposeContext, disposeAction, null); } + if(!regenerate) { + AbstractGraphicsDevice adevice = disposeDrawable.getNativeSurface().getGraphicsConfiguration().getNativeGraphicsConfiguration().getScreen().getDevice(); + String adeviceMsg=null; + if(DEBUG) { + adeviceMsg = adevice.toString(); + } + // boolean closed = adevice.close(); + boolean closed = false; + if (DEBUG) { + System.err.println("GLJPanel.dispose(false): closed GraphicsDevice: " + adeviceMsg + ", result: " + closed); + } + } + backend.setContext(disposeContext); if(null==disposeContext) { isInitialized = false; @@ -656,16 +669,6 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable { disposeDrawable.setRealized(true); disposeContext = (GLContextImpl) disposeDrawable.createContext(shareWith); disposeContext.setSynchronized(true); - } else { - AbstractGraphicsDevice adevice = disposeDrawable.getNativeSurface().getGraphicsConfiguration().getNativeGraphicsConfiguration().getScreen().getDevice(); - String adeviceMsg=null; - if(DEBUG) { - adeviceMsg = adevice.toString(); - } - boolean closed = adevice.close(); - if (DEBUG) { - System.err.println("GLJPanel.dispose(false): closed GraphicsDevice: " + adeviceMsg + ", result: " + closed); - } } } } |