diff options
author | Kevin Rushforth <[email protected]> | 2005-12-20 19:01:57 +0000 |
---|---|---|
committer | Kevin Rushforth <[email protected]> | 2005-12-20 19:01:57 +0000 |
commit | cac51fe3e2ad463dc97538a348715cbc14fd30fd (patch) | |
tree | 2961e64115f368740502f5b29562717521109f4e /src/native/ogl | |
parent | ca9425e6e24cb02235257e85662774e56662cd37 (diff) |
Issue 78: Rendering stops if there's an exception in the EventDispatch
Issue 204: linux-amd64 build needs support for Cg
Issue 212: PureImmediate test fails to rotate
git-svn-id: https://svn.java.net/svn/j3d-core~svn/trunk@480 ba19aa83-45c5-6ac9-afd3-db810772062c
Diffstat (limited to 'src/native/ogl')
-rw-r--r-- | src/native/ogl/build-linux-amd64.xml | 63 | ||||
-rw-r--r-- | src/native/ogl/build-linux-i586.xml | 10 | ||||
-rw-r--r-- | src/native/ogl/build-windows-i586-vc.xml | 2 |
3 files changed, 50 insertions, 25 deletions
diff --git a/src/native/ogl/build-linux-amd64.xml b/src/native/ogl/build-linux-amd64.xml index 6676258..2561c59 100644 --- a/src/native/ogl/build-linux-amd64.xml +++ b/src/native/ogl/build-linux-amd64.xml @@ -13,40 +13,62 @@ */ --> -<!-- Ant file for building native ogl renderer files for Linux AMD64 --> +<!-- Ant file for building native ogl renderer files for Linux/amd64 --> <project name="Java 3D" default="compile"> - <target name="compile"> - - <!-- - /* - * TODO: To compile CG, add the following the the "link" command: - * -lCg -lCgGL -lGLU -lpthread - */ - --> - - <echo message="Executing 64 bit native renderer build [${bldType}]"/> - + <target name="init" depends="init-cg,init-nocg"> <!-- Create the build directories for linux --> <mkdir dir="${build}/${platform}/${bldType}/native/ogl/objs"/> <mkdir dir="${build}/${platform}/${bldType}/lib/amd64"/> <property name="oglsrc" location="${src}/native/ogl"/> + </target> + + <target name="init-cg" if="build.cg"> + <property name="cflags.cg" value="-DCOMPILE_CG_SHADERS=1"/> + </target> + + <target name="init-nocg" unless="build.cg"> + <property name="cflags.cg" value=""/> + </target> + + <target name="compile-ogl"> + <echo message="Executing 64 bit native renderer build [${bldType}]"/> <!-- Compile the c source files--> <!-- Inhibit all warning for 32 bit build. Any warning will be caught in the 64 bit build --> <exec dir="${build}/${platform}/${bldType}/native/ogl/objs" executable="gcc"> - <arg line="-m64 -march=k8 -I${oglsrc} -I${java.home}/../include -I${java.home}/../include/linux -I${javahCoreTarget} ${bldFlag} -DLINUX -c ${oglsrc}/DrawingSurfaceObjectAWT.c ${oglsrc}/Canvas3D.c ${oglsrc}/GraphicsContext3D.c ${oglsrc}/NativeWSInfo.c ${oglsrc}/NativeScreenInfo.c ${oglsrc}/NativeConfigTemplate3D.c ${oglsrc}/MasterControl.c ${oglsrc}/RasterRetained.c ${oglsrc}/GeometryArrayRetained.c ${oglsrc}/Attributes.c ${oglsrc}/CgShaderProgram.c ${oglsrc}/GLSLShaderProgram.c ${oglsrc}/Lights.c ${oglsrc}/NativeAPIInfo.c"/> + <arg line="-m64 -march=k8 -I${oglsrc} -I${java.home}/../include -I${java.home}/../include/linux -I${javahCoreTarget} ${bldFlag} -DLINUX ${cflags.cg} -c ${oglsrc}/DrawingSurfaceObjectAWT.c ${oglsrc}/Canvas3D.c ${oglsrc}/GraphicsContext3D.c ${oglsrc}/NativeWSInfo.c ${oglsrc}/NativeScreenInfo.c ${oglsrc}/NativeConfigTemplate3D.c ${oglsrc}/MasterControl.c ${oglsrc}/RasterRetained.c ${oglsrc}/GeometryArrayRetained.c ${oglsrc}/Attributes.c ${oglsrc}/CgShaderProgram.c ${oglsrc}/GLSLShaderProgram.c ${oglsrc}/Lights.c ${oglsrc}/NativeAPIInfo.c"/> </exec> <!-- Create the library file--> <exec dir="${build}/${platform}/${bldType}/native/ogl/objs" executable="ld"> - <arg line="DrawingSurfaceObjectAWT.o Canvas3D.o GraphicsContext3D.o NativeWSInfo.o NativeScreenInfo.o NativeConfigTemplate3D.o MasterControl.o RasterRetained.o GeometryArrayRetained.o Attributes.o CgShaderProgram.o GLSLShaderProgram.o Lights.o NativeAPIInfo.o -G -z defs -L/usr/X11R6/lib64 -ldl -lGL -lX11 -lXext -lm -lnsl -lc -R/usr/openwin/lib -L${java.home}/lib/amd64 -ljawt -L${java.home}/lib/amd64/server -ljvm -o libj3dcore-ogl.so"/> + <arg line="DrawingSurfaceObjectAWT.o Canvas3D.o GraphicsContext3D.o NativeWSInfo.o NativeScreenInfo.o NativeConfigTemplate3D.o MasterControl.o RasterRetained.o GeometryArrayRetained.o Attributes.o CgShaderProgram.o GLSLShaderProgram.o Lights.o NativeAPIInfo.o -G -z defs -L/usr/X11R6/lib64 -ldl -lGL -lX11 -lXext -lm -lnsl -lc -L${java.home}/lib/amd64 -ljawt -L${java.home}/lib/amd64/server -ljvm -o libj3dcore-ogl.so"/> </exec> - <!-- Copy the copyright library file --> - <copy file="${build}/${platform}/${bldType}/native/ogl/objs/libj3dcore-ogl.so" - todir="${build}/${platform}/${bldType}/lib/amd64"/> + </target> + + <target name="compile-ogl-cg" if="build.cg"> + <!-- Compile the wrapper --> + <exec dir="${build}/${platform}/${bldType}/native/ogl/objs" executable="gcc"> + <arg line="-m64 -march=k8 -I${oglsrc} -I${java.home}/../include -I${java.home}/../include/linux -I${javahCoreTarget} ${bldFlag} -DLINUX ${cflags.cg} -c ${oglsrc}/CgWrapper.c"/> + </exec> + + <!-- Create the wrapper library --> + <exec dir="${build}/${platform}/${bldType}/native/ogl/objs" executable="ld"> + <arg line="CgWrapper.o -G -z defs -L/usr/X11R6/lib64 -ldl -lCg -lCgGL -lpthread -lGL -lX11 -lXext -lm -lnsl -lc -o libj3dcore-ogl-cg.so"/> + </exec> + + </target> + + <target name="compile" depends="init,compile-ogl,compile-ogl-cg"> + + <!-- Copy the library file --> + <copy todir="${build}/${platform}/${bldType}/lib/amd64"> + <fileset dir="${build}/${platform}/${bldType}/native/ogl/objs" + includes="libj3dcore-ogl*.so" + /> + </copy> </target> @@ -55,8 +77,11 @@ <mkdir dir="${dist}/${platform}/lib/amd64"/> <!-- Copy the library files --> - <copy file="${build}/${platform}/opt/lib/amd64/libj3dcore-ogl.so" - todir="${dist}/${platform}/lib/amd64"/> + <copy todir="${dist}/${platform}/lib/amd64"> + <fileset dir="${build}/${platform}/opt/lib/amd64" + includes="libj3dcore-ogl*.so" + /> + </copy> </target> diff --git a/src/native/ogl/build-linux-i586.xml b/src/native/ogl/build-linux-i586.xml index 6d17b00..8198ed3 100644 --- a/src/native/ogl/build-linux-i586.xml +++ b/src/native/ogl/build-linux-i586.xml @@ -13,7 +13,7 @@ */ --> -<!-- Ant file for building native ogl renderer files for Solaris --> +<!-- Ant file for building native ogl renderer files for Linux/x86 --> <project name="Java 3D" default="compile"> <target name="init" depends="init-cg,init-nocg"> @@ -38,12 +38,12 @@ <!-- Compile the c source files--> <!-- Inhibit all warning for 32 bit build. Any warning will be caught in the 64 bit build --> <exec dir="${build}/${platform}/${bldType}/native/ogl/objs" executable="gcc"> - <arg line="-w -m32 -mcpu=i386 -I${oglsrc} -I${java.home}/../include -I${java.home}/../include/linux -I/usr/openwin/include -I${javahCoreTarget} ${bldFlag} -DLINUX ${cflags.cg} -c ${oglsrc}/DrawingSurfaceObjectAWT.c ${oglsrc}/Canvas3D.c ${oglsrc}/GraphicsContext3D.c ${oglsrc}/NativeWSInfo.c ${oglsrc}/NativeScreenInfo.c ${oglsrc}/NativeConfigTemplate3D.c ${oglsrc}/MasterControl.c ${oglsrc}/RasterRetained.c ${oglsrc}/GeometryArrayRetained.c ${oglsrc}/Attributes.c ${oglsrc}/CgShaderProgram.c ${oglsrc}/GLSLShaderProgram.c ${oglsrc}/Lights.c ${oglsrc}/NativeAPIInfo.c"/> + <arg line="-w -m32 -mcpu=i386 -I${oglsrc} -I${java.home}/../include -I${java.home}/../include/linux -I${javahCoreTarget} ${bldFlag} -DLINUX ${cflags.cg} -c ${oglsrc}/DrawingSurfaceObjectAWT.c ${oglsrc}/Canvas3D.c ${oglsrc}/GraphicsContext3D.c ${oglsrc}/NativeWSInfo.c ${oglsrc}/NativeScreenInfo.c ${oglsrc}/NativeConfigTemplate3D.c ${oglsrc}/MasterControl.c ${oglsrc}/RasterRetained.c ${oglsrc}/GeometryArrayRetained.c ${oglsrc}/Attributes.c ${oglsrc}/CgShaderProgram.c ${oglsrc}/GLSLShaderProgram.c ${oglsrc}/Lights.c ${oglsrc}/NativeAPIInfo.c"/> </exec> <!-- Create the library file--> <exec dir="${build}/${platform}/${bldType}/native/ogl/objs" executable="ld"> - <arg line="DrawingSurfaceObjectAWT.o Canvas3D.o GraphicsContext3D.o NativeWSInfo.o NativeScreenInfo.o NativeConfigTemplate3D.o MasterControl.o RasterRetained.o GeometryArrayRetained.o Attributes.o CgShaderProgram.o GLSLShaderProgram.o Lights.o NativeAPIInfo.o -G -z defs -L/usr/X11R6/lib -ldl -lGL -lX11 -lXext -lm -lnsl -lc -R/usr/openwin/lib -L${java.home}/lib/i386 -ljawt -L${java.home}/lib/i386/server -ljvm -o libj3dcore-ogl.so"/> + <arg line="DrawingSurfaceObjectAWT.o Canvas3D.o GraphicsContext3D.o NativeWSInfo.o NativeScreenInfo.o NativeConfigTemplate3D.o MasterControl.o RasterRetained.o GeometryArrayRetained.o Attributes.o CgShaderProgram.o GLSLShaderProgram.o Lights.o NativeAPIInfo.o -G -z defs -L/usr/X11R6/lib -ldl -lGL -lX11 -lXext -lm -lnsl -lc -L${java.home}/lib/i386 -ljawt -L${java.home}/lib/i386/server -ljvm -o libj3dcore-ogl.so"/> </exec> </target> @@ -51,12 +51,12 @@ <target name="compile-ogl-cg" if="build.cg"> <!-- Compile the wrapper --> <exec dir="${build}/${platform}/${bldType}/native/ogl/objs" executable="gcc"> - <arg line="-m32 -mcpu=i386 -I${oglsrc} -I${java.home}/../include -I${java.home}/../include/linux -I/usr/openwin/include -I${javahCoreTarget} ${bldFlag} -DLINUX ${cflags.cg} -c ${oglsrc}/CgWrapper.c"/> + <arg line="-m32 -mcpu=i386 -I${oglsrc} -I${java.home}/../include -I${java.home}/../include/linux -I${javahCoreTarget} ${bldFlag} -DLINUX ${cflags.cg} -c ${oglsrc}/CgWrapper.c"/> </exec> <!-- Create the wrapper library --> <exec dir="${build}/${platform}/${bldType}/native/ogl/objs" executable="ld"> - <arg line="CgWrapper.o -G -z defs -L/usr/X11R6/lib -ldl -lCg -lCgGL -lpthread -lGL -lX11 -lXext -lm -lnsl -lc -R/usr/openwin/lib -L${java.home}/lib/i386 -ljawt -L${java.home}/lib/i386/server -ljvm -o libj3dcore-ogl-cg.so"/> + <arg line="CgWrapper.o -G -z defs -L/usr/X11R6/lib -ldl -lCg -lCgGL -lpthread -lGL -lX11 -lXext -lm -lnsl -lc -o libj3dcore-ogl-cg.so"/> </exec> </target> diff --git a/src/native/ogl/build-windows-i586-vc.xml b/src/native/ogl/build-windows-i586-vc.xml index 1977e00..15acf9f 100644 --- a/src/native/ogl/build-windows-i586-vc.xml +++ b/src/native/ogl/build-windows-i586-vc.xml @@ -74,7 +74,7 @@ <!-- Create the library file--> <exec dir="${build}/${platform}/${bldType}/native/ogl/objs" executable="link"> - <arg line="-nologo -dll -subsystem:windows -pdb:none -machine:I386 -out:j3dcore-ogl-cg.dll CgWrapper.obj kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib delayimp.lib -DELAYLOAD:jawt.dll -LIBPATH:"${java.home}\..\lib" jawt.lib -LIBPATH:"${cg.home}\lib" cg.lib cgGL.lib"/> + <arg line="-nologo -dll -subsystem:windows -pdb:none -machine:I386 -out:j3dcore-ogl-cg.dll CgWrapper.obj kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib delayimp.lib -LIBPATH:"${cg.home}\lib" cg.lib cgGL.lib"/> </exec> </target> |