diff options
-rwxr-xr-x | make/glx-CustomCCode.c | 6 | ||||
-rw-r--r-- | src/classes/com/sun/opengl/impl/x11/X11GLDrawableFactory.java | 18 |
2 files changed, 7 insertions, 17 deletions
diff --git a/make/glx-CustomCCode.c b/make/glx-CustomCCode.c index 3b9130662..2beaa0b2b 100755 --- a/make/glx-CustomCCode.c +++ b/make/glx-CustomCCode.c @@ -76,3 +76,9 @@ Java_com_sun_opengl_impl_x11_GLX_dlsym(JNIEnv *env, jclass _unused, jstring name (*env)->ReleaseStringUTFChars(env, name, chars); return (jlong) ((intptr_t) res); } + +/* We expect glXGetProcAddressARB to be defined */ +extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *); + +/* Need to pull this in as we don't have a stub header for it */ +extern Bool XineramaEnabled(Display* display); diff --git a/src/classes/com/sun/opengl/impl/x11/X11GLDrawableFactory.java b/src/classes/com/sun/opengl/impl/x11/X11GLDrawableFactory.java index feb3233b1..594fb0f7f 100644 --- a/src/classes/com/sun/opengl/impl/x11/X11GLDrawableFactory.java +++ b/src/classes/com/sun/opengl/impl/x11/X11GLDrawableFactory.java @@ -54,10 +54,6 @@ 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 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 // in this case @@ -102,16 +98,6 @@ public class X11GLDrawableFactory extends GLDrawableFactoryImpl { com.sun.opengl.impl.NativeLibLoader.loadCore(); DRIHack.end(); - - AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { - String arch = System.getProperty("os.arch").toLowerCase(); - if (arch.equals("amd64") || arch.equals("x86_64")) { - isAMD64 = true; - } - return null; - } - }); } public X11GLDrawableFactory() { @@ -346,9 +332,7 @@ public class X11GLDrawableFactory extends GLDrawableFactoryImpl { public long dynamicLookupFunction(String glFuncName) { long res = 0; - if (!isAMD64) { - res = GLX.glXGetProcAddressARB(glFuncName); - } + res = GLX.glXGetProcAddressARB(glFuncName); if (res == 0) { // GLU routines aren't known to the OpenGL function lookup res = GLX.dlsym(glFuncName); |