summaryrefslogtreecommitdiffstats
path: root/src/classes/com/sun/opengl/impl/x11
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2007-04-20 23:00:52 +0000
committerKenneth Russel <[email protected]>2007-04-20 23:00:52 +0000
commit2d10eb3db6578a369a1038a6173e7fa78d005fcc (patch)
tree0b0d6cb1d8bfc62ac73ed3af6c463c61f32f720e /src/classes/com/sun/opengl/impl/x11
parent5ce6c018f9dfb07a404273c7e7299a5f66442a06 (diff)
Fixed Issue 226: JOGL seg faulting on Solaris AMD64
The implementation of glXGetProcAddressARB on Solaris/AMD64 had a similar problem to that seen on Linux/AMD64 distributions: internally the return value is being cast to a 32-bit value and then sign-extended back to 64 bits, causing the high half of its function pointer return values to be lost. Worked around by using dlsym() for lookup on this OS as well as on Linux/AMD64. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1210 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/classes/com/sun/opengl/impl/x11')
-rw-r--r--src/classes/com/sun/opengl/impl/x11/X11GLDrawableFactory.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/classes/com/sun/opengl/impl/x11/X11GLDrawableFactory.java b/src/classes/com/sun/opengl/impl/x11/X11GLDrawableFactory.java
index 093f31232..feb3233b1 100644
--- a/src/classes/com/sun/opengl/impl/x11/X11GLDrawableFactory.java
+++ b/src/classes/com/sun/opengl/impl/x11/X11GLDrawableFactory.java
@@ -54,8 +54,9 @@ import com.sun.opengl.impl.*;
public class X11GLDrawableFactory extends GLDrawableFactoryImpl {
private static final boolean DEBUG = Debug.debug("X11GLDrawableFactory");
- // There is currently a bug on Linux/AMD64 distributions in glXGetProcAddressARB
- private static boolean isLinuxAMD64;
+ // There is currently a bug on Linux/AMD64 and Solaris/AMD64
+ // distributions in glXGetProcAddressARB
+ private static boolean isAMD64;
// ATI's proprietary drivers apparently send GLX tokens even for
// direct contexts, so we need to disable the context optimizations
@@ -104,10 +105,9 @@ public class X11GLDrawableFactory extends GLDrawableFactoryImpl {
AccessController.doPrivileged(new PrivilegedAction() {
public Object run() {
- String os = System.getProperty("os.name").toLowerCase();
String arch = System.getProperty("os.arch").toLowerCase();
- if (os.startsWith("linux") && arch.equals("amd64")) {
- isLinuxAMD64 = true;
+ if (arch.equals("amd64") || arch.equals("x86_64")) {
+ isAMD64 = true;
}
return null;
}
@@ -346,7 +346,7 @@ public class X11GLDrawableFactory extends GLDrawableFactoryImpl {
public long dynamicLookupFunction(String glFuncName) {
long res = 0;
- if (!isLinuxAMD64) {
+ if (!isAMD64) {
res = GLX.glXGetProcAddressARB(glFuncName);
}
if (res == 0) {