diff options
Diffstat (limited to 'src/classes/com/sun/opengl')
16 files changed, 92 insertions, 57 deletions
diff --git a/src/classes/com/sun/opengl/impl/GLContextImpl.java b/src/classes/com/sun/opengl/impl/GLContextImpl.java index 94b35bd89..02cbd6581 100644 --- a/src/classes/com/sun/opengl/impl/GLContextImpl.java +++ b/src/classes/com/sun/opengl/impl/GLContextImpl.java @@ -86,6 +86,10 @@ public abstract class GLContextImpl extends GLContext { setGL(createGL()); } + public GLDrawableImpl getDrawableImpl() { + return (GLDrawableImpl) getGLDrawable(); + } + public int makeCurrent() throws GLException { // Support calls to makeCurrent() over and over again with // different contexts without releasing them @@ -289,7 +293,7 @@ public abstract class GLContextImpl extends GLContext { /** Helper routine which resets a ProcAddressTable generated by the GLEmitter by looking up anew all of its function pointers. */ protected void resetProcAddressTable(Object table) { - GLProcAddressHelper.resetProcAddressTable(table, (GLDrawableFactoryImpl)getGLDrawable().getFactory()); + GLProcAddressHelper.resetProcAddressTable(table, getDrawableImpl().getFactoryImpl()); } /** Indicates whether the underlying OpenGL context has been @@ -351,7 +355,7 @@ public abstract class GLContextImpl extends GLContext { } catch (Exception e) {} } // dynamic function lookup at last incl name aliasing (not cached) - GLDrawableFactoryImpl factoryImpl = (GLDrawableFactoryImpl)getGLDrawable().getFactory(); + GLDrawableFactoryImpl factoryImpl = getDrawableImpl().getFactoryImpl(); String tmpBase = GLExtensionNames.normalizeVEN(GLExtensionNames.normalizeARB(glFunctionName, true), true); long addr = 0; int variants = GLExtensionNames.getFuncNamePermutationNumber(tmpBase); diff --git a/src/classes/com/sun/opengl/impl/GLDrawableFactoryImpl.java b/src/classes/com/sun/opengl/impl/GLDrawableFactoryImpl.java index 6eb405b0d..e252e3e6a 100644 --- a/src/classes/com/sun/opengl/impl/GLDrawableFactoryImpl.java +++ b/src/classes/com/sun/opengl/impl/GLDrawableFactoryImpl.java @@ -76,6 +76,27 @@ public abstract class GLDrawableFactoryImpl extends GLDrawableFactory implements public abstract void loadGLULibrary(); //--------------------------------------------------------------------------- + // Support for locking and unlocking the toolkit -- needed only on X11 platforms + protected static boolean lockedToolkit = false; + + public void lockToolkit() throws GLException { + if(lockedToolkit) { + throw new GLException("Toolkit already locked"); + } + lockedToolkit=true; + } + + public void unlockToolkit() { + if(lockedToolkit) { + lockedToolkit=false; + } + } + + public boolean isToolkitLocked() { + return lockedToolkit; + } + + //--------------------------------------------------------------------------- // Support for Java2D/JOGL bridge on Mac OS X; the external // GLDrawable mechanism in the public API is sufficienit to // implement this functionality on all other platforms diff --git a/src/classes/com/sun/opengl/impl/GLDrawableImpl.java b/src/classes/com/sun/opengl/impl/GLDrawableImpl.java index 9ae42906f..643c9ebe5 100644 --- a/src/classes/com/sun/opengl/impl/GLDrawableImpl.java +++ b/src/classes/com/sun/opengl/impl/GLDrawableImpl.java @@ -55,6 +55,10 @@ public abstract class GLDrawableImpl implements GLDrawable { this.realized = realized; } + public GLDrawableFactoryImpl getFactoryImpl() { + return (GLDrawableFactoryImpl) getFactory(); + } + /** For offscreen GLDrawables (pbuffers and "pixmap" drawables), indicates that native resources should be reclaimed. */ public void destroy() throws GLException { diff --git a/src/classes/com/sun/opengl/impl/egl/EGLContext.java b/src/classes/com/sun/opengl/impl/egl/EGLContext.java index 40ab077a6..cf95f3d69 100755 --- a/src/classes/com/sun/opengl/impl/egl/EGLContext.java +++ b/src/classes/com/sun/opengl/impl/egl/EGLContext.java @@ -148,7 +148,7 @@ public class EGLContext extends GLContextImpl { } protected void releaseImpl() throws GLException { - getGLDrawable().getFactory().lockToolkit(); + getDrawableImpl().getFactoryImpl().lockToolkit(); try { if (!EGL.eglMakeCurrent(drawable.getDisplay(), EGL.EGL_NO_SURFACE, @@ -158,13 +158,13 @@ public class EGLContext extends GLContextImpl { Long.toHexString(context) + ": error code " + EGL.eglGetError()); } } finally { - getGLDrawable().getFactory().unlockToolkit(); + getDrawableImpl().getFactoryImpl().unlockToolkit(); drawable.unlockSurface(); } } protected void destroyImpl() throws GLException { - getGLDrawable().getFactory().lockToolkit(); + getDrawableImpl().getFactoryImpl().lockToolkit(); try { if (context != 0) { if (!EGL.eglDestroyContext(drawable.getDisplay(), context)) { @@ -175,7 +175,7 @@ public class EGLContext extends GLContextImpl { GLContextShareSet.contextDestroyed(this); } } finally { - getGLDrawable().getFactory().unlockToolkit(); + getDrawableImpl().getFactoryImpl().unlockToolkit(); } } @@ -242,11 +242,11 @@ public class EGLContext extends GLContextImpl { public synchronized String getPlatformExtensionsString() { if (!eglQueryStringInitialized) { eglQueryStringAvailable = - ((GLDrawableFactoryImpl)getGLDrawable().getFactory()).dynamicLookupFunction("eglQueryString") != 0; + getDrawableImpl().getFactoryImpl().dynamicLookupFunction("eglQueryString") != 0; eglQueryStringInitialized = true; } if (eglQueryStringAvailable) { - GLDrawableFactory factory = getGLDrawable().getFactory(); + GLDrawableFactoryImpl factory = getDrawableImpl().getFactoryImpl(); boolean wasLocked = factory.isToolkitLocked(); if(!wasLocked) { factory.lockToolkit(); diff --git a/src/classes/com/sun/opengl/impl/egl/EGLDrawable.java b/src/classes/com/sun/opengl/impl/egl/EGLDrawable.java index 5915e5cd3..cc80a9957 100755 --- a/src/classes/com/sun/opengl/impl/egl/EGLDrawable.java +++ b/src/classes/com/sun/opengl/impl/egl/EGLDrawable.java @@ -161,7 +161,7 @@ public class EGLDrawable extends GLDrawableImpl { } public void swapBuffers() throws GLException { - getFactory().lockToolkit(); + getFactoryImpl().lockToolkit(); try { if (component.getSurfaceHandle() == 0) { if (lockSurface() == NativeWindow.LOCK_SURFACE_NOT_READY) { @@ -173,7 +173,7 @@ public class EGLDrawable extends GLDrawableImpl { } finally { unlockSurface(); - getFactory().unlockToolkit(); + getFactoryImpl().unlockToolkit(); } } diff --git a/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXPbufferCGLDrawable.java b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXPbufferCGLDrawable.java index 3444bd57a..b11e0f275 100644 --- a/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXPbufferCGLDrawable.java +++ b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXPbufferCGLDrawable.java @@ -68,7 +68,7 @@ public class MacOSXPbufferCGLDrawable extends MacOSXCGLDrawable { } public void destroy() { - getFactory().lockToolkit(); + getFactoryImpl().lockToolkit(); try { if (this.pBuffer != 0) { impl.destroy(pBuffer); @@ -78,7 +78,7 @@ public class MacOSXPbufferCGLDrawable extends MacOSXCGLDrawable { } } } finally { - getFactory().unlockToolkit(); + getFactoryImpl().unlockToolkit(); } super.destroy(); } @@ -99,7 +99,7 @@ public class MacOSXPbufferCGLDrawable extends MacOSXCGLDrawable { private void createPbuffer() { NullWindow nw = (NullWindow) getNativeWindow(); - getFactory().lockToolkit(); + getFactoryImpl().lockToolkit(); try { int renderTarget; GLCapabilities capabilities = getRequestedGLCapabilities(); @@ -139,7 +139,7 @@ public class MacOSXPbufferCGLDrawable extends MacOSXCGLDrawable { throw new GLException("pbuffer creation error: CGL.createPBuffer() failed"); } } finally { - getFactory().unlockToolkit(); + getFactoryImpl().unlockToolkit(); } if (DEBUG) { diff --git a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsOffscreenWGLDrawable.java b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsOffscreenWGLDrawable.java index 000278070..8dded7069 100644 --- a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsOffscreenWGLDrawable.java +++ b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsOffscreenWGLDrawable.java @@ -63,7 +63,7 @@ public class WindowsOffscreenWGLDrawable extends WindowsWGLDrawable { } private void create() { - getFactory().lockToolkit(); + getFactoryImpl().lockToolkit(); try { NullWindow nw = (NullWindow) getNativeWindow(); GLCapabilities capabilities = getRequestedGLCapabilities(); @@ -113,12 +113,12 @@ public class WindowsOffscreenWGLDrawable extends WindowsWGLDrawable { choosePixelFormat(false); } finally { - getFactory().unlockToolkit(); + getFactoryImpl().unlockToolkit(); } } public void destroy() { - getFactory().lockToolkit(); + getFactoryImpl().lockToolkit(); try { NullWindow nw = (NullWindow) getNativeWindow(); if (nw.getSurfaceHandle() != 0) { @@ -132,7 +132,7 @@ public class WindowsOffscreenWGLDrawable extends WindowsWGLDrawable { setChosenGLCapabilities(null); } } finally { - getFactory().unlockToolkit(); + getFactoryImpl().unlockToolkit(); } super.destroy(); } diff --git a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsPbufferWGLDrawable.java b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsPbufferWGLDrawable.java index c7d71be0d..40e46a232 100644 --- a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsPbufferWGLDrawable.java +++ b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsPbufferWGLDrawable.java @@ -79,7 +79,7 @@ public class WindowsPbufferWGLDrawable extends WindowsWGLDrawable { } public void destroy() { - getFactory().lockToolkit(); + getFactoryImpl().lockToolkit(); try { NullWindow nw = (NullWindow) getNativeWindow(); if (nw.getSurfaceHandle() != 0) { @@ -99,7 +99,7 @@ public class WindowsPbufferWGLDrawable extends WindowsWGLDrawable { setChosenGLCapabilities(null); } } finally { - getFactory().unlockToolkit(); + getFactoryImpl().unlockToolkit(); } super.destroy(); } @@ -159,7 +159,7 @@ public class WindowsPbufferWGLDrawable extends WindowsWGLDrawable { (capabilities.getPbufferFloatingPointBuffers() ? " [float]" : "")); } - getFactory().lockToolkit(); + getFactoryImpl().lockToolkit(); try { if (!glCapabilities2iattributes(capabilities, iattributes, @@ -335,7 +335,7 @@ public class WindowsPbufferWGLDrawable extends WindowsWGLDrawable { height = tmp[0]; nw.setSize(width, height); } finally { - getFactory().unlockToolkit(); + getFactoryImpl().unlockToolkit(); } if (DEBUG) { diff --git a/src/classes/com/sun/opengl/impl/x11/glx/X11ExternalGLXContext.java b/src/classes/com/sun/opengl/impl/x11/glx/X11ExternalGLXContext.java index 3e9cab1d8..e4f9f4383 100755 --- a/src/classes/com/sun/opengl/impl/x11/glx/X11ExternalGLXContext.java +++ b/src/classes/com/sun/opengl/impl/x11/glx/X11ExternalGLXContext.java @@ -50,7 +50,7 @@ public class X11ExternalGLXContext extends X11GLXContext { public X11ExternalGLXContext() { super(null, null); - getGLDrawable().getFactory().lockToolkit(); + getDrawableImpl().getFactoryImpl().lockToolkit(); try { context = GLX.glXGetCurrentContext(); if (context == 0) { @@ -60,7 +60,7 @@ public class X11ExternalGLXContext extends X11GLXContext { nw.setDisplayHandle(GLX.glXGetCurrentDisplay()); drawable = new Drawable(getGLDrawable().getFactory(), nw); } finally { - getGLDrawable().getFactory().unlockToolkit(); + getDrawableImpl().getFactoryImpl().unlockToolkit(); } GLContextShareSet.contextCreated(this); resetGLFunctionAvailability(); 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(); } } diff --git a/src/classes/com/sun/opengl/impl/x11/glx/X11GLXContext.java b/src/classes/com/sun/opengl/impl/x11/glx/X11GLXContext.java index 097cc6e71..b18cc6623 100644 --- a/src/classes/com/sun/opengl/impl/x11/glx/X11GLXContext.java +++ b/src/classes/com/sun/opengl/impl/x11/glx/X11GLXContext.java @@ -172,18 +172,18 @@ public abstract class X11GLXContext extends GLContextImpl { } protected void releaseImpl() throws GLException { - getGLDrawable().getFactory().lockToolkit(); + getDrawableImpl().getFactoryImpl().lockToolkit(); try { if (!GLX.glXMakeContextCurrent(drawable.getNativeWindow().getDisplayHandle(), 0, 0, 0)) { throw new GLException("Error freeing OpenGL context"); } } finally { - getGLDrawable().getFactory().unlockToolkit(); + getDrawableImpl().getFactoryImpl().unlockToolkit(); } } protected void destroyImpl() throws GLException { - getGLDrawable().getFactory().lockToolkit(); + getDrawableImpl().getFactoryImpl().lockToolkit(); try { if (context != 0) { if (DEBUG) { @@ -200,7 +200,7 @@ public abstract class X11GLXContext extends GLContextImpl { GLContextShareSet.contextDestroyed(this); } } finally { - getGLDrawable().getFactory().unlockToolkit(); + getDrawableImpl().getFactoryImpl().unlockToolkit(); } } @@ -220,12 +220,12 @@ public abstract class X11GLXContext extends GLContextImpl { if (drawable.getNativeWindow().getDisplayHandle() == 0) { throw new GLException("Connection to X display not yet set up"); } - getGLDrawable().getFactory().lockToolkit(); + getDrawableImpl().getFactoryImpl().lockToolkit(); try { GLX.glXCopyContext(drawable.getNativeWindow().getDisplayHandle(), src, dst, mask); // Should check for X errors and raise GLException } finally { - getGLDrawable().getFactory().unlockToolkit(); + getDrawableImpl().getFactoryImpl().unlockToolkit(); } } @@ -245,11 +245,11 @@ public abstract class X11GLXContext extends GLContextImpl { public synchronized String getPlatformExtensionsString() { if (!glXQueryExtensionsStringInitialized) { glXQueryExtensionsStringAvailable = - ((GLDrawableFactoryImpl)getGLDrawable().getFactory()).dynamicLookupFunction("glXQueryExtensionsString") != 0; + getDrawableImpl().getFactoryImpl().dynamicLookupFunction("glXQueryExtensionsString") != 0; glXQueryExtensionsStringInitialized = true; } if (glXQueryExtensionsStringAvailable) { - GLDrawableFactory factory = getGLDrawable().getFactory(); + GLDrawableFactoryImpl factory = getDrawableImpl().getFactoryImpl(); boolean wasLocked = factory.isToolkitLocked(); if(!wasLocked) { factory.lockToolkit(); @@ -293,14 +293,14 @@ public abstract class X11GLXContext extends GLContextImpl { public boolean isExtensionAvailable(String glExtensionName) { if (glExtensionName.equals("GL_ARB_pbuffer") || glExtensionName.equals("GL_ARB_pixel_format")) { - return ((GLDrawableFactory)getGLDrawable().getFactory()).canCreateGLPbuffer(); + return getGLDrawable().getFactory().canCreateGLPbuffer(); } return super.isExtensionAvailable(glExtensionName); } public void setSwapInterval(int interval) { - getGLDrawable().getFactory().lockToolkit(); + getDrawableImpl().getFactoryImpl().lockToolkit(); try { // FIXME: make the context current first? Currently assumes that // will not be necessary. Make the caller do this? @@ -309,7 +309,7 @@ public abstract class X11GLXContext extends GLContextImpl { glXExt.glXSwapIntervalSGI(interval); } } finally { - getGLDrawable().getFactory().unlockToolkit(); + getDrawableImpl().getFactoryImpl().unlockToolkit(); } } diff --git a/src/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawable.java b/src/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawable.java index 229686428..cf34d9492 100644 --- a/src/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawable.java +++ b/src/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawable.java @@ -78,9 +78,9 @@ public abstract class X11GLXDrawable extends GLDrawableImpl { XVisualInfo template = XVisualInfo.create(); // FIXME: probably not 64-bit clean template.visualid((int) visualID); - getFactory().lockToolkit(); + getFactoryImpl().lockToolkit(); XVisualInfo[] infos = X11Lib.XGetVisualInfo(display, X11Lib.VisualIDMask, template, count, 0); - getFactory().unlockToolkit(); + getFactoryImpl().unlockToolkit(); if (infos == null || infos.length == 0) { throw new GLException("Error while getting XVisualInfo for visual ID " + visualID+", "+this); } @@ -105,7 +105,11 @@ public abstract class X11GLXDrawable extends GLDrawableImpl { template.screen(screen); XVisualInfo[] infos = null; GLCapabilities[] caps = null; - getFactory().lockToolkit(); + boolean didLock = false; + if (!getFactoryImpl().isToolkitLocked()) { + getFactoryImpl().lockToolkit(); + didLock = true; + } try { infos = X11Lib.XGetVisualInfo(display, X11Lib.VisualScreenMask, template, count, 0); if (infos == null) { @@ -116,7 +120,9 @@ public abstract class X11GLXDrawable extends GLDrawableImpl { caps[i] = ((X11GLXDrawableFactory)getFactory()).xvi2GLCapabilities(display, infos[i]); } } finally { - getFactory().unlockToolkit(); + if (didLock) { + getFactoryImpl().unlockToolkit(); + } } GLCapabilities capabilities = getRequestedGLCapabilities(); int chosen = chooser.chooseCapabilities(capabilities, caps, -1); diff --git a/src/classes/com/sun/opengl/impl/x11/glx/X11OffscreenGLXContext.java b/src/classes/com/sun/opengl/impl/x11/glx/X11OffscreenGLXContext.java index 63232374c..c6d787f2b 100644 --- a/src/classes/com/sun/opengl/impl/x11/glx/X11OffscreenGLXContext.java +++ b/src/classes/com/sun/opengl/impl/x11/glx/X11OffscreenGLXContext.java @@ -71,11 +71,11 @@ public class X11OffscreenGLXContext extends X11GLXContext { } protected int makeCurrentImpl() throws GLException { - getGLDrawable().getFactory().lockToolkit(); + getDrawableImpl().getFactoryImpl().lockToolkit(); try { return super.makeCurrentImpl(); } finally { - getGLDrawable().getFactory().unlockToolkit(); + getDrawableImpl().getFactoryImpl().unlockToolkit(); } } diff --git a/src/classes/com/sun/opengl/impl/x11/glx/X11OffscreenGLXDrawable.java b/src/classes/com/sun/opengl/impl/x11/glx/X11OffscreenGLXDrawable.java index 9289d7c02..77aa03a83 100644 --- a/src/classes/com/sun/opengl/impl/x11/glx/X11OffscreenGLXDrawable.java +++ b/src/classes/com/sun/opengl/impl/x11/glx/X11OffscreenGLXDrawable.java @@ -70,7 +70,7 @@ public class X11OffscreenGLXDrawable extends X11GLXDrawable { XVisualInfo vis = chooseVisual(false); int bitsPerPixel = vis.depth(); - getFactory().lockToolkit(); + getFactoryImpl().lockToolkit(); try { int screen = X11Lib.DefaultScreen(dpy); nw.setScreenIndex(screen); @@ -94,7 +94,7 @@ public class X11OffscreenGLXDrawable extends X11GLXDrawable { } setChosenGLCapabilities(((X11GLXDrawableFactory)getFactory()).xvi2GLCapabilities(dpy, vis)); } finally { - getFactory().unlockToolkit(); + getFactoryImpl().unlockToolkit(); } } @@ -111,7 +111,7 @@ public class X11OffscreenGLXDrawable extends X11GLXDrawable { } // Must destroy pixmap and GLXPixmap - getFactory().lockToolkit(); + getFactoryImpl().lockToolkit(); if (DEBUG) { long cur = GLX.glXGetCurrentContext(); @@ -133,7 +133,7 @@ public class X11OffscreenGLXDrawable extends X11GLXDrawable { display = 0; setChosenGLCapabilities(null); } finally { - getFactory().unlockToolkit(); + getFactoryImpl().unlockToolkit(); } super.destroy(); } diff --git a/src/classes/com/sun/opengl/impl/x11/glx/X11OnscreenGLXDrawable.java b/src/classes/com/sun/opengl/impl/x11/glx/X11OnscreenGLXDrawable.java index bc25594b6..fc3460480 100644 --- a/src/classes/com/sun/opengl/impl/x11/glx/X11OnscreenGLXDrawable.java +++ b/src/classes/com/sun/opengl/impl/x11/glx/X11OnscreenGLXDrawable.java @@ -65,7 +65,7 @@ public class X11OnscreenGLXDrawable extends X11GLXDrawable { } public void swapBuffers() throws GLException { - getFactory().lockToolkit(); + getFactoryImpl().lockToolkit(); try { if (component.getSurfaceHandle() == 0) { if (lockSurface() == NativeWindow.LOCK_SURFACE_NOT_READY) { @@ -77,7 +77,7 @@ public class X11OnscreenGLXDrawable extends X11GLXDrawable { } finally { unlockSurface(); - getFactory().unlockToolkit(); + getFactoryImpl().unlockToolkit(); } } diff --git a/src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java b/src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java index 36422c994..26a1ae932 100644 --- a/src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java +++ b/src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java @@ -79,7 +79,7 @@ public class X11PbufferGLXDrawable extends X11GLXDrawable { } public void destroy() { - getFactory().lockToolkit(); + getFactoryImpl().lockToolkit(); try { NullWindow nw = (NullWindow) getNativeWindow(); if (nw.getSurfaceHandle() != 0) { @@ -88,7 +88,7 @@ public class X11PbufferGLXDrawable extends X11GLXDrawable { } nw.setDisplayHandle(0); } finally { - getFactory().unlockToolkit(); + getFactoryImpl().unlockToolkit(); } super.destroy(); } @@ -101,7 +101,7 @@ public class X11PbufferGLXDrawable extends X11GLXDrawable { } private void createPbuffer() { - getFactory().lockToolkit(); + getFactoryImpl().lockToolkit(); try { NullWindow nw = (NullWindow) getNativeWindow(); long display = nw.getDisplayHandle(); @@ -211,7 +211,7 @@ public class X11PbufferGLXDrawable extends X11GLXDrawable { System.err.println("Created pbuffer " + width + " x " + height); } } finally { - getFactory().unlockToolkit(); + getFactoryImpl().unlockToolkit(); } } |