From dba4677caf231ac26c70518a3e82651b0e01c8f2 Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Wed, 9 Nov 2005 20:11:30 +0000 Subject: Refactored JOGL's use of the JAWT to enable it to be more lazily loaded. Separated out AWT-specific native code into a new jogl_awt native library on all platforms. Added a static helper method to the JAWT class to fetch the JAWT which is now called by all users. Added a new NativeLibLoader entry point to load the native code for the AWT implementation. Renamed the X11 platform's "lockAWT" and "unlockAWT" methods to "lockToolkit" and "unlockToolkit", respectively. In order to change this behavior only two methods in X11GLDrawableFactory need to be overridden. (During the writing of this checkin comment it was noted that these methods are currently static, but that will be fixed in a subsequent checkin.) Added the new jogl_awt native library to the the "dist" target's error checking code. Tested on Windows; more testing, including build testing, is needed on other platforms. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@429 232f8b59-042b-4e1e-8c03-345bb8c30851 --- src/classes/com/sun/opengl/impl/x11/X11PbufferGLDrawable.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/classes/com/sun/opengl/impl/x11/X11PbufferGLDrawable.java') diff --git a/src/classes/com/sun/opengl/impl/x11/X11PbufferGLDrawable.java b/src/classes/com/sun/opengl/impl/x11/X11PbufferGLDrawable.java index 2a1248405..85df39267 100644 --- a/src/classes/com/sun/opengl/impl/x11/X11PbufferGLDrawable.java +++ b/src/classes/com/sun/opengl/impl/x11/X11PbufferGLDrawable.java @@ -78,11 +78,11 @@ public class X11PbufferGLDrawable extends X11GLDrawable { } public void destroy() { - lockAWT(); + lockToolkit(); if (drawable != 0) { GLX.glXDestroyPbuffer(display, drawable); } - unlockAWT(); + unlockToolkit(); display = 0; } @@ -100,7 +100,7 @@ public class X11PbufferGLDrawable extends X11GLDrawable { } public void createPbuffer(long display) { - lockAWT(); + lockToolkit(); try { if (display == 0) { throw new GLException("Null display"); @@ -241,7 +241,7 @@ public class X11PbufferGLDrawable extends X11GLDrawable { System.err.println("Created pbuffer " + width + " x " + height); } } finally { - unlockAWT(); + unlockToolkit(); } } -- cgit v1.2.3