From e9ac743a4160e880202459dfed289f417988d87b Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Sun, 14 Dec 2008 02:00:38 +0000 Subject: Fixed nested toolkit locking problem with X11PbufferGLXDrawable. With this fix pbuffers and the GLJPanel are working again on X11 platforms. Moved lockToolkit, unlockToolkit and isToolkitLocked from GLDrawableFactory to GLDrawableFactoryImpl. Updated all call sites. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1819 232f8b59-042b-4e1e-8c03-345bb8c30851 --- .../com/sun/opengl/impl/x11/glx/X11ExternalGLXDrawable.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/classes/com/sun/opengl/impl/x11/glx/X11ExternalGLXDrawable.java') diff --git a/src/classes/com/sun/opengl/impl/x11/glx/X11ExternalGLXDrawable.java b/src/classes/com/sun/opengl/impl/x11/glx/X11ExternalGLXDrawable.java index 9b1ef65da..c4dc4c4c0 100755 --- a/src/classes/com/sun/opengl/impl/x11/glx/X11ExternalGLXDrawable.java +++ b/src/classes/com/sun/opengl/impl/x11/glx/X11ExternalGLXDrawable.java @@ -72,7 +72,7 @@ public class X11ExternalGLXDrawable extends X11GLXDrawable { } protected static X11ExternalGLXDrawable create(GLDrawableFactory factory) { - factory.lockToolkit(); + ((GLDrawableFactoryImpl) factory).lockToolkit(); try { long display = GLX.glXGetCurrentDisplay(); long drawable = GLX.glXGetCurrentDrawable(); @@ -89,7 +89,7 @@ public class X11ExternalGLXDrawable extends X11GLXDrawable { nw.setScreenIndex(screen); return new X11ExternalGLXDrawable(factory, nw); } finally { - factory.unlockToolkit(); + ((GLDrawableFactoryImpl) factory).unlockToolkit(); } } @@ -126,7 +126,7 @@ public class X11ExternalGLXDrawable extends X11GLXDrawable { // Note that we have to completely override makeCurrentImpl // because the underlying makeCurrent call differs from the norm - getFactory().lockToolkit(); + getFactoryImpl().lockToolkit(); try { boolean created = false; if (context == 0) { @@ -156,18 +156,18 @@ public class X11ExternalGLXDrawable extends X11GLXDrawable { } return CONTEXT_CURRENT; } finally { - getFactory().unlockToolkit(); + getFactoryImpl().unlockToolkit(); } } protected void releaseImpl() throws GLException { - getFactory().lockToolkit(); + getFactoryImpl().lockToolkit(); try { if (!GLX.glXMakeContextCurrent(drawable.getNativeWindow().getDisplayHandle(), 0, 0, 0)) { throw new GLException("Error freeing OpenGL context"); } } finally { - getFactory().unlockToolkit(); + getFactoryImpl().unlockToolkit(); } } -- cgit v1.2.3