diff options
Diffstat (limited to 'make/build-jogl.xml')
-rw-r--r-- | make/build-jogl.xml | 189 |
1 files changed, 135 insertions, 54 deletions
diff --git a/make/build-jogl.xml b/make/build-jogl.xml index 9c017ed62..7b9b8a957 100644 --- a/make/build-jogl.xml +++ b/make/build-jogl.xml @@ -140,11 +140,11 @@ <property name="java.part.es1.dbg" value="javax/media/opengl/TraceGLES1.* javax/media/opengl/DebugGLES1.*"/> - <property name="java.part.es2" - value="javax/media/opengl/**/es2/** com/jogamp/opengl/**/es2/** jogamp/opengl/**/es2/**"/> + <property name="java.part.es2es3" + value="jogamp/opengl/**/es3/**"/> - <property name="java.part.es2.dbg" - value="javax/media/opengl/TraceGLES2.* javax/media/opengl/DebugGLES2.*"/> + <property name="java.part.es2es3.dbg" + value="javax/media/opengl/TraceGLES2.* javax/media/opengl/DebugGLES2.* javax/media/opengl/TraceGLES3.* javax/media/opengl/DebugGLES3.*"/> <property name="java.part.awt" value="javax/media/opengl/awt/** jogamp/opengl/**/awt/** com/jogamp/opengl/util/AWTAnimatorImpl*"/> @@ -319,7 +319,11 @@ <property name="gles2.headers" value="${stub.includes}/opengl/GLES2/*.h" /> <!-- NOTE: this MUST be relative for FileSet --> <!-- CHECK: this may need to be pruned for each platform --> </target> - <target name="declare.gl.gles" depends="declare.gl.gles1, declare.gl.gles2"> + <target name="declare.gl.gles3"> + <property name="gles3.headers" value="${stub.includes}/opengl/GLES3/*.h" /> <!-- NOTE: this MUST be relative for FileSet --> <!-- CHECK: this may need to be pruned for each platform --> + </target> + + <target name="declare.gl.gles" depends="declare.gl.gles1, declare.gl.gles2, declare.gl.gles3"> <!-- Prepare to build the EGL interface --> <property name="window.es.cfg" value="${config.jogl}/egl.cfg" /> <property name="window.es.ext.cfg" value="${config.jogl}/eglext.cfg" /> @@ -381,6 +385,12 @@ <srcfiles refid="stub.includes.dependencies.fileset.2" /> <srcfiles refid="stub.includes.dependencies.fileset.3" /> </uptodate> + <uptodate property="java.generate.skip.es3" + targetfile="${src.generated.java}/javax/media/opengl/GLES3.java"> + <srcfiles refid="stub.includes.dependencies.fileset.1" /> + <srcfiles refid="stub.includes.dependencies.fileset.2" /> + <srcfiles refid="stub.includes.dependencies.fileset.3" /> + </uptodate> <uptodate property="java.generate.skip.gl2" targetfile="${src.generated.java}/javax/media/opengl/GL2.java"> <srcfiles refid="stub.includes.dependencies.fileset.1" /> @@ -398,6 +408,7 @@ <and> <isset property="java.generate.skip.es1"/> <isset property="java.generate.skip.es2"/> + <isset property="java.generate.skip.es3"/> <isset property="java.generate.skip.gl2"/> <isset property="java.generate.skip.glu"/> </and> @@ -440,6 +451,20 @@ </gluegen> </target> + <target name="java.generate.gles1"> + <echo message="Generating GLES1 interface and implementation" /> + <antcall target="java.generate.copy2temp" inheritRefs="true" /> + <gluegen src="${stub.includes.opengl}/gles1.c" + outputRootDir="${build.jogl}" + config="${config.jogl}/gl-es1.cfg" + includeRefid="stub.includes.fileset.all.gldesktop" + literalInclude="${stub.includes.gluegen.gg}" + emitter="com.jogamp.gluegen.opengl.GLEmitter" + debug="false"> + <classpath refid="gluegen-gl.classpath" /> + </gluegen> + </target> + <target name="java.generate.gl2_es2_if"> <echo message="Generating GL2_ES2 interface" /> <antcall target="java.generate.copy2temp" inheritRefs="true" /> @@ -453,12 +478,60 @@ </gluegen> </target> + <target name="java.generate.gles2"> + <echo message="Generating GLES2 interface and implementation" /> + <antcall target="java.generate.copy2temp" inheritRefs="true" /> + <gluegen src="${stub.includes.opengl}/gles2.c" + outputRootDir="${build.jogl}" + config="${config.jogl}/gl-if-es2.cfg" + includeRefid="stub.includes.fileset.all.gldesktop" + literalInclude="${stub.includes.gluegen.gg}" + emitter="com.jogamp.gluegen.opengl.GLEmitter"> + <classpath refid="gluegen-gl.classpath" /> + </gluegen> + </target> + + <target name="java.generate.gl2_es3_if"> + <echo message="Generating GL2_ES3 interface" /> + <antcall target="java.generate.copy2temp" inheritRefs="true" /> + <gluegen src="${stub.includes.opengl}/gles3.c" + outputRootDir="${build.jogl}" + config="${config.jogl}/gl-if-gl2es3-subset.cfg" + includeRefid="stub.includes.fileset.all.gldesktop" + literalInclude="${stub.includes.gluegen.gg}" + emitter="com.jogamp.gluegen.opengl.GLEmitter" + debug="false"> + <classpath refid="gluegen-gl.classpath" /> + </gluegen> + <gluegen src="${stub.includes.opengl}/gl2.c" + outputRootDir="${build.jogl}" + config="${config.jogl}/gl-if-gl2_es3.cfg" + includeRefid="stub.includes.fileset.all.gldesktop" + literalInclude="${stub.includes.gluegen.gg}" + emitter="com.jogamp.gluegen.opengl.GLEmitter"> + <classpath refid="gluegen-gl.classpath" /> + </gluegen> + </target> + + <target name="java.generate.gl3_es3_if"> + <echo message="Generating GL3_ES3 interface" /> + <antcall target="java.generate.copy2temp" inheritRefs="true" /> + <gluegen src="${stub.includes.opengl}/gles3.c" + outputRootDir="${build.jogl}" + config="${config.jogl}/gl-if-gl3_es3.cfg" + includeRefid="stub.includes.fileset.all.gldesktop" + literalInclude="${stub.includes.gluegen.gg}" + emitter="com.jogamp.gluegen.opengl.GLEmitter"> + <classpath refid="gluegen-gl.classpath" /> + </gluegen> + </target> + <target name="java.generate.gl2_gl3_if"> <echo message="Generating GL2_GL3 interface" /> <antcall target="java.generate.copy2temp" inheritRefs="true" /> <gluegen src="${stub.includes.opengl}/gl3.c" outputRootDir="${build.jogl}" - config="${config.jogl}/gl-if-gl3-subset.cfg" + config="${config.jogl}/gl-if-gl2gl3-subset.cfg" includeRefid="stub.includes.fileset.all.gldesktop" literalInclude="${stub.includes.gluegen.gg}" emitter="com.jogamp.gluegen.opengl.GLEmitter" @@ -514,12 +587,12 @@ </gluegen> </target> - <target name="java.generate.gl4"> - <echo message="Generating GL4 interface" /> + <target name="java.generate.gl4_es3_if"> + <echo message="Generating GL4_ES3 interface" /> <antcall target="java.generate.copy2temp" inheritRefs="true" /> - <gluegen src="${stub.includes.opengl}/gl4.c" + <gluegen src="${stub.includes.opengl}/gles3.c" outputRootDir="${build.jogl}" - config="${config.jogl}/gl-if-gl4.cfg" + config="${config.jogl}/gl-if-gl4_es3.cfg" includeRefid="stub.includes.fileset.all.gldesktop" literalInclude="${stub.includes.gluegen.gg}" emitter="com.jogamp.gluegen.opengl.GLEmitter"> @@ -527,48 +600,47 @@ </gluegen> </target> - <target name="java.generate.gl4bc"> - <echo message="Generating GL4bc implementation" /> + <target name="java.generate.gles3"> + <echo message="Generating GLES3 interface and implementation" /> <antcall target="java.generate.copy2temp" inheritRefs="true" /> - <gluegen src="${stub.includes.opengl}/gl4bc.c" + <gluegen src="${stub.includes.opengl}/gles3.c" outputRootDir="${build.jogl}" - config="${config.jogl}/gl-gl4bc.cfg" + config="${config.jogl}/gl-es3.cfg" includeRefid="stub.includes.fileset.all.gldesktop" literalInclude="${stub.includes.gluegen.gg}" - emitter="com.jogamp.gluegen.opengl.GLEmitter" - debug="false"> + emitter="com.jogamp.gluegen.opengl.GLEmitter"> <classpath refid="gluegen-gl.classpath" /> </gluegen> </target> - <target name="java.generate.gles1"> - <echo message="Generating GLES1 interface and implementation" /> + <target name="java.generate.gl4"> + <echo message="Generating GL4 interface" /> <antcall target="java.generate.copy2temp" inheritRefs="true" /> - <gluegen src="${stub.includes.opengl}/gles1.c" + <gluegen src="${stub.includes.opengl}/gl4.c" outputRootDir="${build.jogl}" - config="${config.jogl}/gl-es1.cfg" + config="${config.jogl}/gl-if-gl4.cfg" includeRefid="stub.includes.fileset.all.gldesktop" literalInclude="${stub.includes.gluegen.gg}" - emitter="com.jogamp.gluegen.opengl.GLEmitter" - debug="false"> + emitter="com.jogamp.gluegen.opengl.GLEmitter"> <classpath refid="gluegen-gl.classpath" /> </gluegen> </target> - <target name="java.generate.gles2"> - <echo message="Generating GLES2 interface and implementation" /> + <target name="java.generate.gl4bc"> + <echo message="Generating GL4bc implementation" /> <antcall target="java.generate.copy2temp" inheritRefs="true" /> - <gluegen src="${stub.includes.opengl}/gles2.c" + <gluegen src="${stub.includes.opengl}/gl4bc.c" outputRootDir="${build.jogl}" - config="${config.jogl}/gl-es2.cfg" + config="${config.jogl}/gl-gl4bc.cfg" includeRefid="stub.includes.fileset.all.gldesktop" literalInclude="${stub.includes.gluegen.gg}" - emitter="com.jogamp.gluegen.opengl.GLEmitter"> + emitter="com.jogamp.gluegen.opengl.GLEmitter" + debug="false"> <classpath refid="gluegen-gl.classpath" /> </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.gl4, java.generate.gl4bc, java.generate.gles1, java.generate.gles2"/> + <target name="java.generate.gl.all" depends="build.gluegen-gl.jar, java.generate.gl_if, java.generate.gl2_es1_if, java.generate.gles1, java.generate.gl2_es2_if, java.generate.gles2, java.generate.gl2_es3_if, java.generate.gl3_es3_if, java.generate.gl2_gl3_if, java.generate.gl2, java.generate.gl3, java.generate.gl3bc, java.generate.gl4_es3_if, java.generate.gles3, java.generate.gl4, java.generate.gl4bc"/> <!-- target name="java.generate.gl.nsig" if="gluegen.nsig"> <echo message="Generating GL interface and implementation" /> @@ -735,28 +807,17 @@ <fileset dir="${classes}" includes="${java.part.gluegen-gl-rt} ${java.part.gluegen-gl}"/> </jar> - </target> - - <target name="java.generate" depends="build.gluegen-gl.jar, java.generate.check" unless="java.generate.skip"> <!-- Add the GlueGen and BuildStaticGLInfo tasks to ANT --> <taskdef name="gluegen" classname="com.jogamp.gluegen.ant.GlueGenTask" classpathref="gluegen.classpath" /> <taskdef name="staticglgen" classname="com.jogamp.gluegen.opengl.ant.StaticGLGenTask" classpathref="gluegen-gl.classpath" /> - - <!-- Use the GlueGen and BuildStaticGLInfo tasks to generate the Java files --> + </target> - <!-- Just to have a fast test of single interfaces .. - <antcall target="java.generate.gl_if" inheritRefs="true" /> - <antcall target="java.generate.gl2_es1_if" inheritRefs="true" /> - <antcall target="java.generate.gl2_es2_if" inheritRefs="true" /> - <antcall target="java.generate.gl2_gl3_if" inheritRefs="true" /> - <antcall target="java.generate.gles1" inheritRefs="true"/> - <antcall target="java.generate.window.system.es" inheritRefs="true" /> - <antcall target="java.generate.window.system.es.ext" inheritRefs="true" /> - <antcall target="java.generate.gl4bc" inheritRefs="true"/> - <fail/> --> + <target name="java.generate" depends="build.gluegen-gl.jar, java.generate.check" unless="java.generate.skip"> + + <!-- Use the GlueGen and BuildStaticGLInfo tasks to generate the Java files --> <echo message="Generating GL interface and implementation" /> <antcall target="java.generate.gl.all" inheritRefs="true" /> @@ -822,12 +883,6 @@ - the classpath reference id then running the task on each header. --> <target name="java.generate.cg" depends="build.gluegen-gl.jar,java.generate.cg.check" unless="java.generate.cg.skip"> - <!-- Add the GlueGen and BuildStaticGLInfo tasks to ANT --> - <taskdef name="gluegen" classname="com.jogamp.gluegen.ant.GlueGenTask" - classpathref="gluegen.classpath" /> - <taskdef name="staticglgen" classname="com.jogamp.gluegen.opengl.ant.StaticGLGenTask" - classpathref="gluegen-gl.classpath" /> - <!-- Generate CgGL interface class --> <gluegen src="${stub.includes.opengl}/cg.c" outputRootDir="${build.jogl}" @@ -875,6 +930,22 @@ </target> + <target name="java.generate.composable.pipeline.check.es3"> + <!-- 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="GLES3.class" /> + <targetfileset dir="${src.generated.java}/javax/media/opengl" + includes="DebugGLES3.java,TraceGLES3.java" /> + </dependset> + + <!-- Now choose one of the two to test to see if we have to regenerate --> + <uptodate property="java.generate.composable.pipeline.skip.es3" + srcfile="${classes}/javax/media/opengl/GLES3.class" + targetfile="${src.generated.java}/javax/media/opengl/DebugGLES3.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) --> @@ -936,6 +1007,14 @@ </java> </target> + <target name="java.generate.composable.pipeline.es3" depends="java.generate.composable.pipeline.check.es3" unless="java.generate.composable.pipeline.skip.es3"> + <java classname="com.jogamp.gluegen.opengl.BuildComposablePipeline" fork="yes" failonerror="true"> + <arg value="javax.media.opengl.GLES3" /> + <arg value="${src.generated.java}/javax/media/opengl" /> + <classpath refid="pipeline.classpath" /> + </java> + </target> + <target name="java.generate.composable.pipeline.gl2" depends="java.generate.composable.pipeline.check.gl2" unless="java.generate.composable.pipeline.skip.gl2"> <java classname="com.jogamp.gluegen.opengl.BuildComposablePipeline" fork="yes" failonerror="true"> <arg value="javax.media.opengl.GL2" /> @@ -972,7 +1051,7 @@ </java> </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 name="java.generate.composable.pipeline" depends="java.generate.composable.pipeline.es1, java.generate.composable.pipeline.es2, java.generate.composable.pipeline.es3, 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"> @@ -1013,7 +1092,7 @@ <target name="java.compile.firstpass" depends="java.generate,java.generate.cg"> <!-- Perform the first pass Java compile. --> <javac destdir="${classes}" - includes="javax/media/opengl/fixedfunc/** javax/media/opengl/GLDrawableFactory.java javax/media/opengl/GLDrawable.java javax/media/opengl/GLContext.java javax/media/opengl/GL.java javax/media/opengl/GL2ES1.java javax/media/opengl/GL2ES2.java javax/media/opengl/GL2GL3.java javax/media/opengl/GL2.java javax/media/opengl/GLES1.java javax/media/opengl/GLES2.java javax/media/opengl/GL3.java javax/media/opengl/GL3bc.java javax/media/opengl/GL4.java javax/media/opengl/GL4bc.java" + includes="javax/media/opengl/fixedfunc/** javax/media/opengl/GLDrawableFactory.java javax/media/opengl/GLDrawable.java javax/media/opengl/GLContext.java javax/media/opengl/GL.java javax/media/opengl/GL2ES1.java javax/media/opengl/GLES1.java javax/media/opengl/GL2ES2.java javax/media/opengl/GLES2.java javax/media/opengl/GL2ES3.java javax/media/opengl/GL2GL3.java javax/media/opengl/GL2.java javax/media/opengl/GL3ES3.java javax/media/opengl/GL3.java javax/media/opengl/GL3bc.java javax/media/opengl/GL4ES3.java javax/media/opengl/GLES3.java javax/media/opengl/GL4.java javax/media/opengl/GL4bc.java" fork="yes" includeAntRuntime="false" memoryMaximumSize="${javac.memorymax}" @@ -1414,6 +1493,7 @@ <include name="${rootrel.generated.c.jogl}/egl/EGL_JNI.c"/> <include name="${rootrel.generated.c.jogl}/egl/EGLExtImpl_JNI.c"/> <include name="${rootrel.generated.c.jogl}/es2/GLES2Impl_JNI.c"/> + <include name="${rootrel.generated.c.jogl}/es3/GLES3Impl_JNI.c"/> <include name="${rootrel.generated.c.jogl}/es1/GLES1Impl_JNI.c"/> <!--include name="${rootrel.generated.c.jogl}/GLU_JNI.c"/ EMPTY --> <!--include name="${rootrel.generated.c.jogl}/es1/GLUes1_JNI.c" EMPTY /--> @@ -1544,6 +1624,7 @@ <!-- exec mt, the Microsoft Manifest Tool, to include DLL manifests in order to resolve the location of msvcr80.dll --> <msvc.manifest objdir="${obj.jogl}" dllname="jogl_es1" /> <msvc.manifest objdir="${obj.jogl}" dllname="jogl_es2" /> + <msvc.manifest objdir="${obj.jogl}" dllname="jogl_es3" /> <msvc.manifest objdir="${obj.jogl}" dllname="jogl_desktop" /> <antcall target="c.manifest.cg" inheritRefs="true" /> </target> @@ -1603,12 +1684,12 @@ <target name="build-jars-mobile-javase" depends="setup-manifestfile"> <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl-glmobile.jar}" filesonly="true"> <fileset dir="${classes}" - includes="${java.part.egl} ${java.part.es1} ${java.part.es2}" - excludes="${java.part.awt} ${java.part.swt} ${java.part.es1.dbg} ${java.part.es2.dbg}"/> + includes="${java.part.egl} ${java.part.es1} ${java.part.es2es3}" + excludes="${java.part.awt} ${java.part.swt} ${java.part.es1.dbg} ${java.part.es2es3.dbg}"/> </jar> <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl-glmobile-dbg.jar}" filesonly="true"> <fileset dir="${classes}" - includes="${java.part.es1.dbg} ${java.part.es2.dbg}"/> + includes="${java.part.es1.dbg} ${java.part.es2es3.dbg}"/> </jar> </target> |