summaryrefslogtreecommitdiffstats
path: root/src/net/java/games
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2005-02-04 03:21:23 +0000
committerKenneth Russel <[email protected]>2005-02-04 03:21:23 +0000
commite748f469a21a4e9cd5ae2421f594bd88afd42bec (patch)
treef4042dd10277c5c84878b9d96f709b16c6aa73b0 /src/net/java/games
parent8da5bfa2d72282bfdcd2889a70a93a4072221a1c (diff)
Fixed bug in X11GLContext where additional locking was needed in
pbuffer case. Doesn't seem to (and shouldn't) affect the normal onscreen case. Added additional debugging output. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@210 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/net/java/games')
-rw-r--r--src/net/java/games/jogl/impl/FunctionAvailabilityCache.java4
-rw-r--r--src/net/java/games/jogl/impl/x11/X11GLContext.java16
2 files changed, 19 insertions, 1 deletions
diff --git a/src/net/java/games/jogl/impl/FunctionAvailabilityCache.java b/src/net/java/games/jogl/impl/FunctionAvailabilityCache.java
index 01a70e4b7..a4b67b5e8 100644
--- a/src/net/java/games/jogl/impl/FunctionAvailabilityCache.java
+++ b/src/net/java/games/jogl/impl/FunctionAvailabilityCache.java
@@ -114,6 +114,10 @@ public final class FunctionAvailabilityCache {
}
String allAvailableExtensions =
gl.glGetString(GL.GL_EXTENSIONS) + " " + context.getPlatformExtensionsString();
+ if (DEBUG) {
+ System.err.println("!!! Available extensions: " + allAvailableExtensions);
+ System.err.println("!!! GL vendor: " + gl.glGetString(GL.GL_VENDOR));
+ }
StringTokenizer tok = new StringTokenizer(allAvailableExtensions);
while (tok.hasMoreTokens()) {
String availableExt = tok.nextToken().trim();
diff --git a/src/net/java/games/jogl/impl/x11/X11GLContext.java b/src/net/java/games/jogl/impl/x11/X11GLContext.java
index 1f8023e66..eb5c7fdf6 100644
--- a/src/net/java/games/jogl/impl/x11/X11GLContext.java
+++ b/src/net/java/games/jogl/impl/x11/X11GLContext.java
@@ -237,6 +237,11 @@ public abstract class X11GLContext extends GLContext {
if (!GLX.glXQueryVersion(display, major, minor)) {
throw new GLException("glXQueryVersion failed");
}
+ if (DEBUG) {
+ System.err.println("!!! GLX version: major " + major[0] +
+ ", minor " + minor[0]);
+ }
+
isGLX13 = ((major[0] > 1) || (minor[0] > 2));
}
@@ -258,7 +263,16 @@ public abstract class X11GLContext extends GLContext {
glXQueryExtensionsStringInitialized = true;
}
if (glXQueryExtensionsStringAvailable) {
- return GLX.glXQueryExtensionsString(display, GLX.DefaultScreen(display));
+ lockAWT();
+ try {
+ String ret = GLX.glXQueryExtensionsString(display, GLX.DefaultScreen(display));
+ if (DEBUG) {
+ System.err.println("!!! GLX extensions: " + ret);
+ }
+ return ret;
+ } finally {
+ unlockAWT();
+ }
} else {
return "";
}