aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes/com/sun/opengl/impl/x11/glx/X11ExternalGLXDrawable.java
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2008-12-14 02:00:38 +0000
committerKenneth Russel <[email protected]>2008-12-14 02:00:38 +0000
commite9ac743a4160e880202459dfed289f417988d87b (patch)
treedfad0de6464cf2369880b77f8c69aa3389809591 /src/classes/com/sun/opengl/impl/x11/glx/X11ExternalGLXDrawable.java
parent638507b43021bc7635844ba38ea4db4e1ab5ef87 (diff)
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
Diffstat (limited to 'src/classes/com/sun/opengl/impl/x11/glx/X11ExternalGLXDrawable.java')
-rwxr-xr-xsrc/classes/com/sun/opengl/impl/x11/glx/X11ExternalGLXDrawable.java12
1 files changed, 6 insertions, 6 deletions
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();
}
}