From dba4677caf231ac26c70518a3e82651b0e01c8f2 Mon Sep 17 00:00:00 2001
From: Kenneth Russel <kbrussel@alum.mit.edu>
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
---
 .../com/sun/opengl/impl/x11/X11ExternalGLDrawable.java       | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

(limited to 'src/classes/com/sun/opengl/impl/x11/X11ExternalGLDrawable.java')

diff --git a/src/classes/com/sun/opengl/impl/x11/X11ExternalGLDrawable.java b/src/classes/com/sun/opengl/impl/x11/X11ExternalGLDrawable.java
index 371930013..96e1d0034 100755
--- a/src/classes/com/sun/opengl/impl/x11/X11ExternalGLDrawable.java
+++ b/src/classes/com/sun/opengl/impl/x11/X11ExternalGLDrawable.java
@@ -50,7 +50,7 @@ public class X11ExternalGLDrawable extends X11GLDrawable {
 
   public X11ExternalGLDrawable() {
     super(null, null, null);
-    lockAWT();
+    lockToolkit();
     try {
       display = GLX.glXGetCurrentDisplay();
       drawable = GLX.glXGetCurrentDrawable();
@@ -72,7 +72,7 @@ public class X11ExternalGLDrawable extends X11GLDrawable {
       GLX.glXQueryContext(display, context, GLX.GLX_SCREEN, val, 0);
       screen = val[0];
     } finally {
-      unlockAWT();
+      unlockToolkit();
     }
   }
 
@@ -113,7 +113,7 @@ public class X11ExternalGLDrawable extends X11GLDrawable {
 
       // Note that we have to completely override makeCurrentImpl
       // because the underlying makeCurrent call differs from the norm
-      lockAWT();
+      lockToolkit();
       try {
         boolean created = false;
         if (context == 0) {
@@ -144,18 +144,18 @@ public class X11ExternalGLDrawable extends X11GLDrawable {
         }
         return CONTEXT_CURRENT;
       } finally {
-        unlockAWT();
+        unlockToolkit();
       }
     }
 
     protected void releaseImpl() throws GLException {
-      lockAWT();
+      lockToolkit();
       try {
         if (!GLX.glXMakeContextCurrent(drawable.getDisplay(), 0, 0, 0)) {
           throw new GLException("Error freeing OpenGL context");
         }
       } finally {
-        unlockAWT();
+        unlockToolkit();
       }
     }
 
-- 
cgit v1.2.3