diff options
author | Sven Gothel <[email protected]> | 2010-12-12 09:21:16 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2010-12-12 09:21:16 +0100 |
commit | e15344bfaf4df4ceb710b304b164bd03005dc132 (patch) | |
tree | caae50392f0347a300ba54c21eadf0ed33416451 /src/jogl/classes/com/jogamp/opengl/impl/GLPbufferImpl.java | |
parent | 8df12ca151dfc577c90b485d4ebfe491b88e55aa (diff) |
GLJPanel/GLPbufferImpl: destroy pbuffer reentrance fix; disable device close (X11 error on nvidia); reenable GLJPanel test
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/impl/GLPbufferImpl.java')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/impl/GLPbufferImpl.java | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/GLPbufferImpl.java b/src/jogl/classes/com/jogamp/opengl/impl/GLPbufferImpl.java index 558cda106..5119f5360 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/GLPbufferImpl.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/GLPbufferImpl.java @@ -104,16 +104,18 @@ public class GLPbufferImpl implements GLPbuffer { DisposeAction disposeAction = new DisposeAction(); public void destroy() { - if (null != context) { - try { - drawableHelper.invokeGL(pbufferDrawable, context, disposeAction, null); - } catch (GLException gle) { - gle.printStackTrace(); + if(pbufferDrawable.isRealized()) { + if (null != context && context.isCreated()) { + try { + drawableHelper.invokeGL(pbufferDrawable, context, disposeAction, null); + } catch (GLException gle) { + gle.printStackTrace(); + } + context.destroy(); + // drawableHelper.reset(); } - drawableHelper.reset(); - context.destroy(); + pbufferDrawable.destroy(); } - pbufferDrawable.destroy(); } public void setSize(int width, int height) { |