From fdb0b1d02d783215bcd3d0a29efedb93f43451c9 Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Thu, 27 Jan 2005 06:52:41 +0000 Subject: Partial fix for Issue 88: Add Linux amd64 support to JOGL The stub_includes headers and GlueGen config files have been changed to make X identifiers and similar values appear to Java to be 64-bit values on all platforms, rather than changing between 32-bit and 64-bit values depending on the architecture. This allows the shared Java code in the JOGL X11 implementation to work on both 32- and 64-bit architectures, which is an important step toward having complete 64-bit support in JOGL. Compared to the suggested patch, there is no longer a need to duplicate the sources in net.java.games.jogl.impl.x11 because the Java sources are now 64-bit clean. The change to use dlsym on Linux/AMD64 instead of glXGetProcAddressARB has been conditionalized under a run-time flag. Most of the build.xml and all of the GlueGen changes were incorporated unchanged. Thanks to the original authors of the patch for this work. At this point "ant linux.amd64" should build a working JOGL. However, it can not yet be incorporated into the distribution's platform- independent jogl.jar; in order to do this, the generation of the StructAccessors for the JAWT and some other X11 data structures by GlueGen will need to be conditionalized depending on the platform so that the 32-bit versions go in one directory, the 64-bit versions in another, and a run-time check is done to determine which version to instantiate. There are also a few remaining cleanups to generated glue code such as net.java.games.jogl.impl.x11.GLX.XGetVisualInfo(), which needs to be made platform-independent by calling the XVisualInfo.size() accessor rather than hardwiring in the size of the data structure (although the real solution will probably need to be more complicated since there will probably be two XVisualInfo implementations in the jar file). git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@190 232f8b59-042b-4e1e-8c03-345bb8c30851 --- make/build.xml | 36 +++++++++++++++++++++++++++++++++--- make/gl-common-x11.cfg | 2 ++ make/jawt-x11.cfg | 2 ++ make/stub_includes/x11/X11/X.h | 2 +- 4 files changed, 38 insertions(+), 4 deletions(-) (limited to 'make') diff --git a/make/build.xml b/make/build.xml index 19e192018..29649d06d 100644 --- a/make/build.xml +++ b/make/build.xml @@ -200,6 +200,7 @@ + @@ -303,7 +304,6 @@ - @@ -312,6 +312,13 @@ + + + + + + + @@ -653,6 +660,10 @@ + + + + @@ -706,6 +717,11 @@ + + + + + @@ -845,6 +861,9 @@ + + + @@ -1001,7 +1020,7 @@ -Use a platform specific target: linux, macosx, solaris, win32.vc6, win32.vc7, win32.mingw +Use a platform specific target: linux, linux.amd64, macosx, solaris, win32.vc6, win32.vc7, win32.mingw @@ -1050,7 +1069,18 @@ Use a platform specific target: linux, macosx, solaris, win32.vc6, win32.vc7, w + + + + + + + + + diff --git a/make/gl-common-x11.cfg b/make/gl-common-x11.cfg index 15154e363..5bc2ee8b6 100644 --- a/make/gl-common-x11.cfg +++ b/make/gl-common-x11.cfg @@ -5,6 +5,8 @@ Include gl-common.cfg JavaOutputDir ../build/gensrc/classes NativeOutputDir ../build/gensrc/native/jogl +Opaque long XID + # Get returned array's capacity from XGetVisualInfo to be correct TemporaryCVariableDeclaration XGetVisualInfo int count; TemporaryCVariableAssignment XGetVisualInfo count = _ptr3[0]; diff --git a/make/jawt-x11.cfg b/make/jawt-x11.cfg index 4161d7d13..5794ed4e0 100644 --- a/make/jawt-x11.cfg +++ b/make/jawt-x11.cfg @@ -7,8 +7,10 @@ JavaOutputDir ../build/gensrc/classes NativeOutputDir ../build/gensrc/native/jogl HierarchicalNativeOutput false Opaque boolean jboolean +Opaque long Drawable Opaque long Display * IgnoreField JAWT GetComponent +IgnoreField JAWT_DrawingSurfaceInfo platformInfo IgnoreField JAWT_X11DrawingSurfaceInfo GetAWTColor CustomCCode #include CustomCCode #include diff --git a/make/stub_includes/x11/X11/X.h b/make/stub_includes/x11/X11/X.h index 2cd64bbf0..239836ee4 100644 --- a/make/stub_includes/x11/X11/X.h +++ b/make/stub_includes/x11/X11/X.h @@ -1,7 +1,7 @@ #ifndef _X_H_ #define _X_H_ -typedef unsigned long XID; +typedef struct {} * XID; typedef int Bool; typedef struct {} Display; typedef int Status; -- cgit v1.2.3