aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax/media/opengl
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/javax/media/opengl')
-rw-r--r--src/jogl/classes/javax/media/opengl/awt/GLJPanel.java23
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);
- }
}
}
}