aboutsummaryrefslogtreecommitdiffstats
path: root/make/build-jogl.xml
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-04-20 11:46:26 +0200
committerSven Gothel <[email protected]>2010-04-20 11:46:26 +0200
commit32790c376583beccd030eecd7c56cbe66d380172 (patch)
tree894613c7fc6a598aed59db87e5812ef6a44b83dd /make/build-jogl.xml
parentaa7084700bbf74d8bcc98cf0239f57cff2983423 (diff)
JOGL GL4 preperation (cont):
- All available OpenGL versions (native/platform) are verified at GLProfile initialization and can be queried .. A mapping of major,compat -> major,minor,options is created. - Removal of temp context creation, when creating a context. This was necessary to query general availability of ARB_create_context. Due to the shared context of X11GLXDrawableFactory and WindowsWGLDrawableFactory, this is no more necessary. Due to the version mapping, the ARB_create_context paramters are known. - NativeWindow X11Lib: Added X11ErrorHandler, throwing a RuntimeException. Necessary to catch BadMatch .. etc X11 errors, eg for glXCreateContextAttribsARB Hence all X11 calls are covered now. - X11DummyGLXDrawable needs to use an own Window, otherwise GLn n>2 fails - Flattening the desktop GL* implementation, all use GL4bcImpl, which reduces the footprint dramatically. - GL*Impl.isGL*() (desktop) utilizes the GLContext.isGL*(), hence the results reflect the actual native context version. - GLContextImpl makeCurrent/create: Added workflow documentation, clarified code, defined abstract methods to have a protocol. - Removed moved files (from here to gluegen), see gluegen a01cb3d59715a41153380f1977ec75263b762dc6 - NativeLibLoader -> <TYPE>JNILibLoader - Fixed Exception Handling (as in gluegen bce53b52c8638729750c4286dbc04cb14329fd34), ie removed empty catch Throwable .. - GLContext.setSwapInterval(): Nop in offscreen case, otherwise X11IOError (NVIDIA Bug) Test: Tests - Junit - demos.gears.Gears - demos.jrefract.JRefract Platforms - Linux 64/32 ATI/NVidia - MacOsX - Windows (virtualbox 3.1.6, offscreen failed) TODO/BUGS: - FIXME ATI GLn n>2 with AWT, can't make context current, works well on NVIDIA though - FIXME GL3GL4: Due to GL3 and GL4 implementation bugs, we still choose GL2 first, if available! - Add GL 3.3 to GL3/gl3ext.h - Add GL 4.0 to GL3/gl3ext.h and fix the GL3/GL4 seperation - Rename jogl.gl2.jar -> jogl.gldesktop.jar (as done with it's native lib already)
Diffstat (limited to 'make/build-jogl.xml')
-rw-r--r--make/build-jogl.xml133
1 files changed, 60 insertions, 73 deletions
diff --git a/make/build-jogl.xml b/make/build-jogl.xml
index d42b859bd..6d95ebea8 100644
--- a/make/build-jogl.xml
+++ b/make/build-jogl.xml
@@ -104,9 +104,6 @@
<property name="java.part.cgl"
value="com/jogamp/opengl/impl/macosx/cgl/*"/>
- <property name="java.part.gl2es12"
- value="com/jogamp/opengl/impl/gl2es12/**"/>
-
<property name="java.part.gl4"
value="com/jogamp/opengl/impl/**/gl4/**"/>
@@ -508,12 +505,24 @@
</gluegen>
</target>
- <target name="java.generate.gl2es12">
- <echo message="Generating GL2ES12 implementation" />
+ <target name="java.generate.gl4">
+ <echo message="Generating GL4 interface and implementation" />
+ <antcall target="java.generate.copy2temp" inheritRefs="true" />
+ <gluegen src="${stub.includes.opengl}/gl4.c"
+ outputRootDir="${build.jogl}"
+ config="${config.jogl}/gl-gl4.cfg"
+ includeRefid="stub.includes.fileset.all.gl2"
+ emitter="com.sun.gluegen.opengl.GLEmitter">
+ <classpath refid="gluegen.classpath" />
+ </gluegen>
+ </target>
+
+ <target name="java.generate.gl4bc">
+ <echo message="Generating GL4bc implementation" />
<antcall target="java.generate.copy2temp" inheritRefs="true" />
- <gluegen src="${stub.includes.opengl}/gl2es12.c"
+ <gluegen src="${stub.includes.opengl}/gl4bc.c"
outputRootDir="${build.jogl}"
- config="${config.jogl}/gl-gl2es12.cfg"
+ config="${config.jogl}/gl-gl4bc.cfg"
includeRefid="stub.includes.fileset.all.gl2"
emitter="com.sun.gluegen.opengl.GLEmitter">
<classpath refid="gluegen.classpath" />
@@ -544,7 +553,7 @@
</gluegen>
</target>
- <target name="java.generate.gl.all" depends="java.generate.gl_if, java.generate.gl2_es1_if, java.generate.gl2_es2_if, java.generate.gl2_gl3_if, java.generate.gl2, java.generate.gl3, java.generate.gl3bc, java.generate.gl2es12, java.generate.gles1, java.generate.gles2"/>
+ <target name="java.generate.gl.all" depends="java.generate.gl_if, java.generate.gl2_es1_if, java.generate.gl2_es2_if, java.generate.gl2_gl3_if, java.generate.gl2, java.generate.gl3, java.generate.gl3bc, java.generate.gl4, java.generate.gl4bc, java.generate.gles1, java.generate.gles2"/>
<!-- target name="java.generate.gl.nsig" if="gluegen.nsig">
<echo message="Generating GL interface and implementation" />
@@ -781,21 +790,6 @@
</target>
- <target name="java.generate.composable.pipeline.check.gl2es12">
- <!-- Blow away the DebugGL*.java and TraceGL*.java sources if GL*.class has changed
- (the uptodate element doesn't support arbitrary source and destination files) -->
- <dependset>
- <srcfilelist dir="${classes}/javax/media/opengl" files="GL2ES12.class" />
- <targetfileset dir="${src.generated.java}/javax/media/opengl"
- includes="DebugGL2ES12.java,TraceGL2ES12.java" />
- </dependset>
-
- <!-- Now choose one of the two to test to see if we have to regenerate -->
- <uptodate property="java.generate.composable.pipeline.skip.gl2es12"
- srcfile="${classes}/javax/media/opengl/GL2ES12.class"
- targetfile="${src.generated.java}/javax/media/opengl/DebugGL2ES12.java" />
- </target>
-
<target name="java.generate.composable.pipeline.check.gl2">
<!-- Blow away the DebugGL*.java and TraceGL*.java sources if GL*.class has changed
(the uptodate element doesn't support arbitrary source and destination files) -->
@@ -826,6 +820,21 @@
targetfile="${src.generated.java}/javax/media/opengl/DebugGL3.java" />
</target>
+ <target name="java.generate.composable.pipeline.check.gl4">
+ <!-- Blow away the DebugGL*.java and TraceGL*.java sources if GL*.class has changed
+ (the uptodate element doesn't support arbitrary source and destination files) -->
+ <dependset>
+ <srcfilelist dir="${classes}/javax/media/opengl" files="GL4.class" />
+ <targetfileset dir="${src.generated.java}/javax/media/opengl"
+ includes="DebugGL4.java,TraceGL4.java,DebugGL4bc.java,TraceGL4bc.java" />
+ </dependset>
+
+ <!-- Now choose one of the two to test to see if we have to regenerate -->
+ <uptodate property="java.generate.composable.pipeline.skip.gl4"
+ srcfile="${classes}/javax/media/opengl/GL4.class"
+ targetfile="${src.generated.java}/javax/media/opengl/DebugGL4.java" />
+ </target>
+
<target name="java.generate.composable.pipeline.es1" depends="java.generate.composable.pipeline.check.es1" unless="java.generate.composable.pipeline.skip.es1">
<java classname="com.sun.gluegen.opengl.BuildComposablePipeline" fork="yes" failonerror="true">
<arg value="javax.media.opengl.GLES1" />
@@ -899,7 +908,29 @@
</copy>
</target>
- <target name="java.generate.composable.pipeline" depends="java.generate.composable.pipeline.es1, java.generate.composable.pipeline.es2, java.generate.composable.pipeline.gl2, java.generate.composable.pipeline.gl3">
+ <target name="java.generate.composable.pipeline.gl4" depends="java.generate.composable.pipeline.check.gl4" unless="java.generate.composable.pipeline.skip.gl4">
+ <java classname="com.sun.gluegen.opengl.BuildComposablePipeline" fork="yes" failonerror="true">
+ <arg value="javax.media.opengl.GL4" />
+ <arg value="${src.generated.java}/javax/media/opengl" />
+ <classpath refid="pipeline.classpath" />
+ </java>
+ <copy todir="${src.generated.java-cdc}">
+ <fileset dir="${src.generated.java}"
+ includes="javax/media/opengl/DebugGL4.java javax/media/opengl/TraceGL4.java" />
+ </copy>
+
+ <java classname="com.sun.gluegen.opengl.BuildComposablePipeline" fork="yes" failonerror="true">
+ <arg value="javax.media.opengl.GL4bc" />
+ <arg value="${src.generated.java}/javax/media/opengl" />
+ <classpath refid="pipeline.classpath" />
+ </java>
+ <copy todir="${src.generated.java-cdc}">
+ <fileset dir="${src.generated.java}"
+ includes="javax/media/opengl/DebugGL4bc.java javax/media/opengl/TraceGL4bc.java" />
+ </copy>
+ </target>
+
+ <target name="java.generate.composable.pipeline" depends="java.generate.composable.pipeline.es1, java.generate.composable.pipeline.es2, java.generate.composable.pipeline.gl2, java.generate.composable.pipeline.gl3, java.generate.composable.pipeline.gl4">
</target>
<target name="java.generate.composable.pipeline.custom.check.glfixfunc">
@@ -1259,9 +1290,7 @@
<include name="${rootrel.src.c.openmax}/omx_tool.c" if="useOpenMAX"/>
<include name="${rootrel.src.c.openmax}/com_jogamp_openmax_OMXInstance.c" if="useOpenMAX"/>
- <include name="${rootrel.generated.c.jogl}/gl2/GL2Impl_JNI.c"/>
- <include name="${rootrel.generated.c.jogl}/gl3/GL3Impl_JNI.c"/>
- <include name="${rootrel.generated.c.jogl}/gl3/GL3bcImpl_JNI.c"/>
+ <include name="${rootrel.generated.c.jogl}/gl4/GL4bcImpl_JNI.c"/>
<!--include name="${rootrel.generated.c.jogl}/GLU_JNI.c"/ EMPTY -->
<include name="${rootrel.generated.c.jogl}/gl2/GLUgl2_JNI.c"/>
<include name="${rootrel.generated.c.jogl}/X11/GLX*.c" if="isX11"/>
@@ -1269,24 +1298,6 @@
<include name="${rootrel.generated.c.jogl}/Windows/WGL*.c" if="isWindows"/>
</patternset>
- <patternset id="c.src.files.jogl.gl2es12">
- <include name="${rootrel.src.c}/macosx/MacOSXCustomCGLCode.c" if="isOSX"/>
- <include name="${rootrel.src.c}/macosx/MacOSXWindowSystemInterface.m" if="isOSX"/>
- <include name="${rootrel.src.c}/macosx/ContextUpdater.m" if="isOSX"/>
- <include name="${rootrel.src.c}/GLXGetProcAddressARB.c" if="isX11"/>
- <!-- FIXME: the Mixer should be moved to another library -->
- <!--include name="${rootrel.src.c}/Mixer.cpp" if="isWindows"/-->
- <include name="${rootrel.src.c.openmax}/omx_tool.c" if="useOpenMAX"/>
- <include name="${rootrel.src.c.openmax}/com_jogamp_openmax_OMXInstance.c" if="useOpenMAX"/>
-
- <include name="${rootrel.generated.c.jogl}/gl2es12/GL2ES12Impl_JNI.c"/>
- <!--include name="${rootrel.generated.c.jogl}/GLU_JNI.c"/ EMPTY -->
- <!--include name="${rootrel.generated.c.jogl}/gl2es12/GLUgl2es12_JNI.c"/ SKIPPED -->
- <include name="${rootrel.generated.c.jogl}/X11/GLX*.c" if="isX11"/>
- <include name="${rootrel.generated.c.jogl}/MacOSX/CGL*.c" if="isOSX"/>
- <include name="${rootrel.generated.c.jogl}/Windows/WGL*.c" if="isWindows"/>
- </patternset>
-
<patternset id="c.src.files.jogl.es2">
<include name="${rootrel.src.c}/GLXGetProcAddressARB.c" if="isX11"/>
<include name="${rootrel.src.c.openmax}/omx_tool.c" if="useOpenMAX"/>
@@ -1393,13 +1404,6 @@
linker.cfg.id="${linker.cfg.id.gl2}"/>
</target>
- <target name="c.build.jogl.gl2es12" unless="setup.nodesktop">
- <c.build c.compiler.src.files="c.src.files.jogl.gl2es12"
- output.lib.name="jogl_gl2es12"
- compiler.cfg.id="${compiler.cfg.id}"
- linker.cfg.id="${linker.cfg.id.gl2}"/>
- </target>
-
<target name="c.build.jogl.es2">
<c.build c.compiler.src.files="c.src.files.jogl.es2"
output.lib.name="jogl_es2"
@@ -1430,11 +1434,10 @@
<msvc.manifest objdir="${obj.jogl}" dllname="jogl_es1" />
<msvc.manifest objdir="${obj.jogl}" dllname="jogl_es2" />
<msvc.manifest objdir="${obj.jogl}" dllname="jogl_gl2" />
- <msvc.manifest objdir="${obj.jogl}" dllname="jogl_gl2es12" />
<antcall target="c.manifest.cg" inheritRefs="true" />
</target>
- <target name="c.build.jogl" depends="c.configure,c.build.jogl.prepare,c.build.jogl.gl2es12,c.build.jogl.desktop,c.build.jogl.es2,c.build.jogl.es1,c.build.jogl.cg">
+ <target name="c.build.jogl" depends="c.configure,c.build.jogl.prepare,c.build.jogl.desktop,c.build.jogl.es2,c.build.jogl.es1,c.build.jogl.cg">
<antcall target="gluegen.cpptasks.striplibs" inheritRefs="true">
<param name="libdir" value="${obj.jogl}"/>
</antcall>
@@ -1450,7 +1453,6 @@
<fileset dir="${obj.jogl}">
<include name="*_es1.${native.library.suffix-cdc}" />
<include name="*_es2.${native.library.suffix-cdc}" />
- <include name="*_gl2es12.${native.library.suffix-cdc}" />
</fileset>
</jar>
</target>
@@ -1528,14 +1530,7 @@
</jar>
</target>
- <target name="build-jars-es-desktop-javase" depends="setup-manifestfile,build-jars-os-desktop-javase" unless="setup.nodesktop">
- <jar manifest="${build.jogl}/tempversion" destfile="${jogl.gl2es12.jar}" filesonly="true">
- <fileset dir="${classes}" includes="${java.part.gl2es12}, ${java.part.openmax}"
- excludes="${java.part.glugl2}"/>
- </jar>
- </target>
-
- <target name="build-jars-es-javase" depends="setup-manifestfile,build-jars-es-desktop-javase">
+ <target name="build-jars-es-javase" depends="setup-manifestfile">
<jar manifest="${build.jogl}/tempversion" destfile="${jogl.egl.jar}" filesonly="true">
<fileset dir="${classes}"
includes="${java.part.egl}"
@@ -1573,15 +1568,7 @@
</jar>
</target>
- <target name="build-jars-es-desktop-cdc" depends="setup-manifestfile-cdc,build-jars-os-desktop-cdc" unless="setup.nodesktop">
- <jar manifest="${build.jogl}/tempversion-cdc" destfile="${jogl.gl2es12.cdc.jar}" filesonly="true">
- <fileset dir="${classes-cdc}"
- includes="${java.part.gl2es12}, ${java.part.openmax}"
- excludes="${java.part.glugl2}"/>
- </jar>
- </target>
-
- <target name="build-jars-es-cdc" depends="setup-manifestfile-cdc,build-jars-es-desktop-cdc" unless="setup.noCDC">
+ <target name="build-jars-es-cdc" depends="setup-manifestfile-cdc" unless="setup.noCDC">
<jar manifest="${build.jogl}/tempversion-cdc" destfile="${jogl.egl.cdc.jar}" filesonly="true">
<fileset dir="${classes-cdc}"
includes="${java.part.egl}"
@@ -1645,7 +1632,7 @@
<target name="build-jars-all-cdc" depends="setup-manifestfile">
<jar manifest="${build.jogl}/tempversion-cdc" destfile="${jogl.all.cdc.jar}" filesonly="true">
<fileset dir="${classes-cdc}"
- includes="${java.part.core} ${java.part.egl} ${java.part.glutess} ${java.part.glumipmap} ${java.part.openmax} ${java.part.sdk} ${java.part.glx} ${java.part.cgl} ${java.part.gl2es12} ${java.part.wgl} ${java.part.es1} ${java.part.es1.dbg} ${java.part.es2} ${java.part.es2.dbg} ${java.part.util} ${java.part.util.glsl} ${java.part.util.fixedfuncemu}"
+ includes="${java.part.core} ${java.part.egl} ${java.part.glutess} ${java.part.glumipmap} ${java.part.openmax} ${java.part.sdk} ${java.part.glx} ${java.part.cgl} ${java.part.wgl} ${java.part.es1} ${java.part.es1.dbg} ${java.part.es2} ${java.part.es2.dbg} ${java.part.util} ${java.part.util.glsl} ${java.part.util.fixedfuncemu}"
excludes="${java.excludes.cdcfp}"/>
<fileset dir="${src.java}"
includes="${java.part.util.fixedfuncemu.shadercode}"/>