diff options
author | Sven Gothel <[email protected]> | 2008-06-01 08:25:40 +0000 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2008-06-01 08:25:40 +0000 |
commit | d1b0143a16af0b44cd0811025c2b8296f063e746 (patch) | |
tree | 5584616066f6faeddeabdf0595d9cc8a6ee8e00f | |
parent | 806564c9599510db2bb0e2d0e441ca6ad8068aa0 (diff) |
Refactoring JOGL to partition core windowing, AWT, GL, ES1 and ES2 .. WIP
Compile Clean: X11, noAWT, ES1, no *.impl.x11/win/macosx
See jogl/make/build.xml for new build properties.
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1655 232f8b59-042b-4e1e-8c03-345bb8c30851
-rw-r--r-- | make/build.xml | 73 | ||||
-rwxr-xr-x | make/jawt-CustomJavaCode.java | 2 | ||||
-rw-r--r-- | make/jawt-macosx.cfg | 3 | ||||
-rw-r--r-- | make/jawt-win32.cfg | 3 | ||||
-rw-r--r-- | make/jawt-x11.cfg | 3 |
5 files changed, 71 insertions, 13 deletions
diff --git a/make/build.xml b/make/build.xml index c758b69c4..18795de2d 100644 --- a/make/build.xml +++ b/make/build.xml @@ -47,6 +47,16 @@ - the building of the jar file. Thanks to Alex Radeski for the bulk of the - port to the ant-contrib CPPTask framework. Thanks to Athomas Goldberg for - the original OS detection code. + - + - Some environment defs .. + jogl.cdcfp + jogl.es1 + jogl.es2 + jogl.noAWT + jogl.noX11 + jogl.noWindows + jogl.noMacOsX + jogl.noX11WindowsMacOsX --> <project name="JOGL" basedir="." default="all"> @@ -79,9 +89,11 @@ <!-- Also set isCDCFP for the GlueGen build.xml to keep GL references there to a minimum --> <condition property="isCDCFP"> - <isset property="isGLES" /> + <isset property="jogl.cdcfp" /> </condition> + <echo message="jogl.cdcfp: ${jogl.cdcfp}" /> + <condition property="isGLES1"> <isset property="jogl.es1" /> </condition> @@ -90,6 +102,48 @@ <isset property="jogl.es2" /> </condition> + <echo message="jogl.es1: ${jogl.es1}" /> + <echo message="jogl.es2: ${jogl.es2}" /> + + <condition property="jogl.noX11"> + <isset property="jogl.noX11WindowsMacOsX" /> + </condition> + <condition property="jogl.noWindows"> + <isset property="jogl.noX11WindowsMacOsX" /> + </condition> + <condition property="jogl.noMacOsX"> + <isset property="jogl.noX11WindowsMacOsX" /> + </condition> + + <echo message="jogl.noX11WindowsMacOsX: ${jogl.noX11WindowsMacOsX}" /> + <echo message="jogl.noX11: ${jogl.noX11}" /> + <echo message="jogl.noWindows: ${jogl.noWindows}" /> + <echo message="jogl.noMacOsX: ${jogl.noMacOsX}" /> + + <condition property="java.excludes.awt" + value="javax/media/opengl/awt/**, com/sun/opengl/util/j2d/**, com/sun/opengl/util/JOGLAppletLauncher.java, com/sun/opengl/impl/awt/**, com/sun/opengl/impl/x11/awt/**, com/sun/opengl/impl/windows/awt/**, com/sun/opengl/impl/macosx/awt/**"> + <isset property="jogl.noAWT"/> + </condition> + <echo message="java.excludes.awt: ${java.excludes.awt}" /> + + <condition property="java.excludes.impl.x11" + value="com/sun/opengl/impl/x11/**"> + <isset property="jogl.noX11"/> + </condition> + <echo message="java.excludes.impl.x11: ${java.excludes.impl.x11}" /> + + <condition property="java.excludes.impl.win" + value="com/sun/opengl/impl/windows/**"> + <isset property="jogl.noWindows"/> + </condition> + <echo message="java.excludes.impl.win: ${java.excludes.impl.win}" /> + + <condition property="java.excludes.impl.macosx" + value="com/sun/opengl/impl/macosx/**"> + <isset property="jogl.noMacOsX"/> + </condition> + <echo message="java.excludes.impl.macosx: ${java.excludes.impl.macosx}" /> + <!-- Set the project root directory to be up one directory. --> <property name="project.root" value=".." /> @@ -292,12 +346,12 @@ <target name="declare.gl.gles1" if="isGLES1"> <property name="gl.headers" value="${stub.includes.dir}/opengl/GLES/*.h" /> <!-- NOTE: this MUST be relative for FileSet --> <!-- CHECK: this may need to be pruned for each platform --> - <property name="java.excludes.gles" value="javax/media/opengl/AWTGraphicsConfiguration.java, javax/media/opengl/AWTGraphicsDevice.java, javax/media/opengl/ComponentEvents.java, javax/media/opengl/GLCanvas.java, javax/media/opengl/GLJPanel.java, com/sun/opengl/util/j2d/**, com/sun/opengl/util/texture/**, com/sun/opengl/util/Animator.java, com/sun/opengl/util/FPSAnimator.java, com/sun/opengl/util/*Rec.java, com/sun/opengl/util/GLUT*.java, com/sun/opengl/util/Gamma.java, com/sun/opengl/util/ImageUtil.java, com/sun/opengl/util/JOGLAppletLauncher.java, com/sun/opengl/util/Screenshot.java, com/sun/opengl/util/TGAWriter.java, com/sun/opengl/util/TileRenderer.java, com/sun/opengl/impl/GLObjectTracker.java, com/sun/opengl/impl/GLPbufferImpl.java, com/sun/opengl/impl/GLUquadricImpl.java, com/sun/opengl/impl/Java2D.java, com/sun/opengl/impl/Java2DGLContext.java, com/sun/opengl/impl/JAWT_PlatformInfo.java, com/sun/opengl/impl/Project.java, com/sun/opengl/impl/Util.java, com/sun/opengl/impl/error/**, com/sun/opengl/impl/glue/**, com/sun/opengl/impl/mipmap/**, com/sun/opengl/impl/nurbs/**, com/sun/opengl/impl/packrect/**, com/sun/opengl/impl/registry/**, com/sun/opengl/impl/tessellator/**, com/sun/opengl/impl/windows/**, com/sun/opengl/impl/x11/**, com/sun/opengl/impl/macosx/**" /> + <property name="java.excludes.gles" value="com/sun/opengl/util/texture/**, com/sun/opengl/util/Animator.java, com/sun/opengl/util/FPSAnimator.java, com/sun/opengl/util/*Rec.java, com/sun/opengl/util/GLUT*.java, com/sun/opengl/util/Gamma.java, com/sun/opengl/util/ImageUtil.java, com/sun/opengl/util/Screenshot.java, com/sun/opengl/util/TGAWriter.java, com/sun/opengl/util/TileRenderer.java, com/sun/opengl/impl/GLObjectTracker.java, com/sun/opengl/impl/GLPbufferImpl.java, com/sun/opengl/impl/GLUquadricImpl.java, com/sun/opengl/impl/Project.java, com/sun/opengl/impl/Util.java, com/sun/opengl/impl/error/**, com/sun/opengl/impl/glue/**, com/sun/opengl/impl/mipmap/**, com/sun/opengl/impl/nurbs/**, com/sun/opengl/impl/packrect/**, com/sun/opengl/impl/registry/**, com/sun/opengl/impl/tessellator/**" /> </target> <target name="declare.gl.gles2" if="isGLES2"> <property name="gl.headers" value="${stub.includes.dir}/opengl/GLES2/*.h" /> <!-- NOTE: this MUST be relative for FileSet --> <!-- CHECK: this may need to be pruned for each platform --> - <property name="java.excludes.gles" value="javax/media/opengl/AWTGraphicsConfiguration.java, javax/media/opengl/AWTGraphicsDevice.java, javax/media/opengl/ComponentEvents.java, javax/media/opengl/GLCanvas.java, javax/media/opengl/GLJPanel.java, com/sun/opengl/util/j2d/**, com/sun/opengl/util/texture/**, com/sun/opengl/util/Animator.java, com/sun/opengl/util/FPSAnimator.java, com/sun/opengl/util/*Rec.java, com/sun/opengl/util/GLUT*.java, com/sun/opengl/util/Gamma.java, com/sun/opengl/util/ImageUtil.java, com/sun/opengl/util/JOGLAppletLauncher.java, com/sun/opengl/util/Screenshot.java, com/sun/opengl/util/TGAWriter.java, com/sun/opengl/util/TileRenderer.java, com/sun/opengl/impl/GLObjectTracker.java, com/sun/opengl/impl/GLPbufferImpl.java, com/sun/opengl/impl/GLUquadricImpl.java, com/sun/opengl/impl/Java2D.java, com/sun/opengl/impl/Java2DGLContext.java, com/sun/opengl/impl/JAWT_PlatformInfo.java, com/sun/opengl/impl/Project.java, com/sun/opengl/impl/ProjectES1.java, com/sun/opengl/impl/Util.java, com/sun/opengl/impl/error/**, com/sun/opengl/impl/glue/**, com/sun/opengl/impl/mipmap/**, com/sun/opengl/impl/nurbs/**, com/sun/opengl/impl/packrect/**, com/sun/opengl/impl/registry/**, com/sun/opengl/impl/tessellator/**, com/sun/opengl/impl/windows/**, com/sun/opengl/impl/x11/**, com/sun/opengl/impl/macosx/**" /> + <property name="java.excludes.gles" value="com/sun/opengl/util/texture/**, com/sun/opengl/util/Animator.java, com/sun/opengl/util/FPSAnimator.java, com/sun/opengl/util/*Rec.java, com/sun/opengl/util/GLUT*.java, com/sun/opengl/util/Gamma.java, com/sun/opengl/util/ImageUtil.java, com/sun/opengl/util/Screenshot.java, com/sun/opengl/util/TGAWriter.java, com/sun/opengl/util/TileRenderer.java, com/sun/opengl/impl/GLObjectTracker.java, com/sun/opengl/impl/GLPbufferImpl.java, com/sun/opengl/impl/GLUquadricImpl.java, com/sun/opengl/impl/Project.java, com/sun/opengl/impl/ProjectES1.java, com/sun/opengl/impl/Util.java, com/sun/opengl/impl/error/**, com/sun/opengl/impl/glue/**, com/sun/opengl/impl/mipmap/**, com/sun/opengl/impl/nurbs/**, com/sun/opengl/impl/packrect/**, com/sun/opengl/impl/registry/**, com/sun/opengl/impl/tessellator/**" /> </target> <target name="declare.gl.gles" if="isGLES" depends="declare.gl.gles1, declare.gl.gles2"> @@ -315,16 +369,23 @@ <property name="java.excludes.gles" value="com/sun/opengl/impl/egl/**, com/sun/opengl/impl/ProjectES1.java" /> </target> + <echo message="java.excludes.gles: ${java.excludes.gles}" /> + <!-- Declarations that have to come after both the common setup and the GLES tests --> <target name="declare.common.2"> <!-- Java files to exclude based on platform (relative to "src.java") --> <!-- NOTE: the OpenGL ES exclusions are due to references to unsupported APIs --> <property name="java.excludes.win32.gles" value="com/sun/opengl/impl/windows/*.java" /> - <property name="java.excludes.win32" value="com/sun/opengl/impl/x11/**, com/sun/opengl/impl/macosx/**, ${java.excludes.gles}, ${java.excludes.win32.gles}" /> - <property name="java.excludes.x11" value="com/sun/opengl/impl/windows/**, com/sun/opengl/impl/macosx/**, ${java.excludes.gles}" /> - <property name="java.excludes.macosx" value="com/sun/opengl/impl/x11/**, com/sun/opengl/impl/windows/**, ${java.excludes.gles}" /> + <property name="java.excludes.win32" value="${java.excludes.gles}, ${java.excludes.win32.gles}, ${java.excludes.impl.x11}, ${java.excludes.impl.win}, ${java.excludes.impl.macosx}, ${java.excludes.awt}" /> + <property name="java.excludes.x11" value="${java.excludes.gles}, ${java.excludes.impl.x11}, ${java.excludes.impl.win}, ${java.excludes.impl.macosx}, ${java.excludes.awt}" /> + <property name="java.excludes.macosx" value="${java.excludes.gles}, ${java.excludes.impl.x11}, ${java.excludes.impl.win}, ${java.excludes.impl.macosx}, ${java.excludes.awt}" /> </target> + <echo message="java.excludes.win32.gles: ${java.excludes.win32.gles}" /> + <echo message="java.excludes.win32: ${java.excludes.win32}" /> + <echo message="java.excludes.x11: ${java.excludes.x11}" /> + <echo message="java.excludes.macosx: ${java.excludes.macosx}" /> + <!-- ================================================================== --> <!-- - Platform specific declares. diff --git a/make/jawt-CustomJavaCode.java b/make/jawt-CustomJavaCode.java index 7e8e83b39..c1a56b7f6 100755 --- a/make/jawt-CustomJavaCode.java +++ b/make/jawt-CustomJavaCode.java @@ -5,7 +5,7 @@ public static JAWT getJAWT() { if (jawt == null) { synchronized (JAWT.class) { if (jawt == null) { - NativeLibLoader.loadAWTImpl(); + AWTNativeLibLoader.loadAWTImpl(); // Workaround for 4845371. // Make sure the first reference to the JNI GetDirectBufferAddress is done // from a privileged context so the VM's internal class lookups will succeed. diff --git a/make/jawt-macosx.cfg b/make/jawt-macosx.cfg index 1dd4d297e..5e78b251c 100644 --- a/make/jawt-macosx.cfg +++ b/make/jawt-macosx.cfg @@ -1,7 +1,7 @@ # This .cfg file is used to generate the interface to the JAWT, which # is used by the MacOSXOnscreenGLContext. Style AllStatic -Package com.sun.opengl.impl +Package com.sun.opengl.impl.awt JavaClass JAWTFactory JavaOutputDir ../build/gensrc/classes NativeOutputDir ../build/gensrc/native/jogl @@ -22,7 +22,6 @@ CustomCCode #include <jawt.h> CustomCCode #include </usr/include/machine/types.h> import java.security.* -Import com.sun.opengl.impl.JAWT_PlatformInfo StructPackage JAWT_MacOSXDrawingSurfaceInfo com.sun.opengl.impl.macosx EmitStruct JAWT_MacOSXDrawingSurfaceInfo Implements JAWT_MacOSXDrawingSurfaceInfo JAWT_PlatformInfo diff --git a/make/jawt-win32.cfg b/make/jawt-win32.cfg index 9b3afc13b..b4d5e8e39 100644 --- a/make/jawt-win32.cfg +++ b/make/jawt-win32.cfg @@ -1,7 +1,7 @@ # This .cfg file is used to generate the interface to the JAWT, which # is used by the WindowsOnscreenGLContext. Style AllStatic -Package com.sun.opengl.impl +Package com.sun.opengl.impl.awt JavaClass JAWTFactory JavaOutputDir ..\build\gensrc\classes NativeOutputDir ..\build\gensrc\native\jogl @@ -22,7 +22,6 @@ CustomCCode #include <jawt.h> Include intptr.cfg import java.security.* -Import com.sun.opengl.impl.JAWT_PlatformInfo StructPackage JAWT_Win32DrawingSurfaceInfo com.sun.opengl.impl.windows EmitStruct JAWT_Win32DrawingSurfaceInfo Implements JAWT_Win32DrawingSurfaceInfo JAWT_PlatformInfo diff --git a/make/jawt-x11.cfg b/make/jawt-x11.cfg index 40ac88b50..9f0d07b4f 100644 --- a/make/jawt-x11.cfg +++ b/make/jawt-x11.cfg @@ -1,7 +1,7 @@ # This .cfg file is used to generate the interface to the JAWT, which # is used by the X11OnscreenGLContext. Style AllStatic -Package com.sun.opengl.impl +Package com.sun.opengl.impl.awt JavaClass JAWTFactory JavaOutputDir ../build/gensrc/classes NativeOutputDir ../build/gensrc/native/jogl @@ -22,7 +22,6 @@ CustomCCode #include <inttypes.h> CustomCCode #include <jawt.h> import java.security.* -Import com.sun.opengl.impl.JAWT_PlatformInfo StructPackage JAWT_X11DrawingSurfaceInfo com.sun.opengl.impl.x11 EmitStruct JAWT_X11DrawingSurfaceInfo Implements JAWT_X11DrawingSurfaceInfo JAWT_PlatformInfo |