aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes/com/sun/opengl/impl/x11/X11GLDrawable.java
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2005-11-09 20:11:30 +0000
committerKenneth Russel <[email protected]>2005-11-09 20:11:30 +0000
commitdba4677caf231ac26c70518a3e82651b0e01c8f2 (patch)
tree53b494a55ff1c4a00c6d2bd1dbb3e4b7e66b8b5e /src/classes/com/sun/opengl/impl/x11/X11GLDrawable.java
parent23e6684c5ae7047f39620e861b607db2f761799d (diff)
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
Diffstat (limited to 'src/classes/com/sun/opengl/impl/x11/X11GLDrawable.java')
-rw-r--r--src/classes/com/sun/opengl/impl/x11/X11GLDrawable.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/classes/com/sun/opengl/impl/x11/X11GLDrawable.java b/src/classes/com/sun/opengl/impl/x11/X11GLDrawable.java
index 343931965..bfa467b10 100644
--- a/src/classes/com/sun/opengl/impl/x11/X11GLDrawable.java
+++ b/src/classes/com/sun/opengl/impl/x11/X11GLDrawable.java
@@ -103,9 +103,9 @@ public abstract class X11GLDrawable extends GLDrawableImpl {
XVisualInfo template = XVisualInfo.create();
// FIXME: probably not 64-bit clean
template.visualid((int) visualID);
- lockAWT();
+ lockToolkit();
XVisualInfo[] infos = GLX.XGetVisualInfo(display, GLX.VisualIDMask, template, count, 0);
- unlockAWT();
+ unlockToolkit();
if (infos == null || infos.length == 0) {
throw new GLException("Error while getting XVisualInfo for visual ID " + visualID);
}
@@ -126,7 +126,7 @@ public abstract class X11GLDrawable extends GLDrawableImpl {
template.screen(screen);
XVisualInfo[] infos = null;
GLCapabilities[] caps = null;
- lockAWT();
+ lockToolkit();
try {
infos = GLX.XGetVisualInfo(display, GLX.VisualScreenMask, template, count, 0);
if (infos == null) {
@@ -137,7 +137,7 @@ public abstract class X11GLDrawable extends GLDrawableImpl {
caps[i] = X11GLDrawableFactory.xvi2GLCapabilities(display, infos[i]);
}
} finally {
- unlockAWT();
+ unlockToolkit();
}
int chosen = chooser.chooseCapabilities(capabilities, caps, -1);
if (chosen < 0 || chosen >= caps.length) {
@@ -162,11 +162,11 @@ public abstract class X11GLDrawable extends GLDrawableImpl {
// These synchronization primitives prevent the AWT from making
// requests from the X server asynchronously to this code.
- protected void lockAWT() {
- X11GLDrawableFactory.lockAWT();
+ protected void lockToolkit() {
+ X11GLDrawableFactory.lockToolkit();
}
- protected void unlockAWT() {
- X11GLDrawableFactory.unlockAWT();
+ protected void unlockToolkit() {
+ X11GLDrawableFactory.unlockToolkit();
}
}