From d22ef032e84a79f86683db1e2f829f403c4bb3e2 Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Sat, 21 Apr 2007 01:34:54 +0000 Subject: Re-fixed Issue 226: JOGL seg faulting on Solaris AMD64 The autogenerated GLX_JNI.c was not receiving a prototype for glXGetProcAddressARB and so was receiving the implicit one returning an int, which is obviously wrong on 64-bit architectures. Re-fixed this bug by providing a prototype; removed the workaround in X11GLDrawableFactory. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1211 232f8b59-042b-4e1e-8c03-345bb8c30851 --- .../com/sun/opengl/impl/x11/X11GLDrawableFactory.java | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'src/classes/com/sun/opengl') 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); -- cgit v1.2.3