From e15344bfaf4df4ceb710b304b164bd03005dc132 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 12 Dec 2010 09:21:16 +0100 Subject: GLJPanel/GLPbufferImpl: destroy pbuffer reentrance fix; disable device close (X11 error on nvidia); reenable GLJPanel test --- .../classes/javax/media/opengl/awt/GLJPanel.java | 23 ++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'src/jogl/classes/javax/media/opengl/awt') 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); - } } } } -- cgit v1.2.3