aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xetc/profile.jogl75
-rw-r--r--make/build-jogl.xml171
-rw-r--r--make/build.xml6
-rw-r--r--make/make.jogl.all.linux-x86.sh3
-rw-r--r--make/make.jogl.all.linux-x86_64.sh3
-rw-r--r--make/make.jogl.all.macosx.sh2
-rw-r--r--make/make.jogl.all.win32.bat3
-rw-r--r--make/versions.xml3
-rw-r--r--src/nativewindow/classes/javax/media/nativewindow/x11/X11GraphicsScreen.java21
9 files changed, 193 insertions, 94 deletions
diff --git a/etc/profile.jogl b/etc/profile.jogl
index 517e39b65..5ed6e01d7 100755
--- a/etc/profile.jogl
+++ b/etc/profile.jogl
@@ -1,10 +1,15 @@
#! /bin/sh
+function print_usage()
+{
+ echo "Usage: $0 {JOGL_ALL|JOGL_ES1_MIN|JOGL_ES1_MAX|JOGL_ES2_MIN|JOGL_ES2_MAX|JOGL_GL2ES12_MIN|JOGL_GL2ES12_MAX|JOGL_GL2_MIN|JOGL_GL2_MAX} [jogl-build-dir]"
+}
+
function concat_jogl_list()
{
ITEMDIR=$1
shift
- for j in $ITEMDIR/nativewindow $ITEMDIR/jogl $ITEMDIR/newt ; do
+ for j in $ITEMDIR/nativewindow $ITEMDIR/jogl $ITEMDIR/newt $ITEMDIR ; do
for i in $* ; do
if [ -e $j/$i ] ; then
if [ -z "$JOGL_LIST" ] ; then
@@ -25,7 +30,7 @@ JOGL_AWT="jogl.awt.jar jogl.util.awt.jar newt.awt.jar nativewindow.awt.jar"
JOGL_CORE="nativewindow.core.jar jogl.core.jar newt.core.jar newt.ogl.jar jogl.util.jar"
-JOGL_JAR_ALL="$JOGL_CORE jogl.gles1.jar jogl.gles1.dbg.jar jogl.gles2.jar jogl.gles2.dbg.jar jogl.egl.jar jogl.gl2es12.$OSS.jar jogl.gl2es12.dbg.jar jogl.gl2.$OSS.jar jogl.gl2.dbg.jar jogl.util.gl2.jar jogl.glu.tess.jar jogl.glu.mipmap.jar jogl.glu.gl2.jar jogl.util.gl2.jar jogl.util.fixedfuncemu.jar $JOGL_AWT"
+JOGL_JAR_ALL="$JOGL_CORE jogl.gles1.jar jogl.gles1.dbg.jar jogl.gles2.jar jogl.gles2.dbg.jar jogl.egl.jar jogl.gl2es12.$OSS.jar jogl.gl2es12.dbg.jar jogl.gl2.$OSS.jar jogl.gl2.dbg.jar jogl.util.gl2.jar jogl.glu.tess.jar jogl.glu.mipmap.jar jogl.glu.gl2.jar jogl.util.gl2.jar jogl.util.fixedfuncemu.jar $JOGL_AWT jogl.cg.jar"
JOGL_LIB_ALL="libjogl_gl2.so libjogl_es1.so libjogl_es2.so libnewt.so libjogl_awt.so"
JOGL_JAR_ES1_MIN="$JOGL_CORE jogl.gles1.jar jogl.egl.jar"
@@ -44,55 +49,81 @@ JOGL_LIB_GL2ES12_MIN="libjogl_gl2es12.so libnewt.so libnativewindow_x11.so libna
JOGL_LIB_GL2ES12_MAX="libjogl_gl2es12.so libnewt.so libnativewindow_x11.so libnativewindow_awt.so"
JOGL_JAR_GL2_MIN="$JOGL_CORE jogl.gl2.$OSS.jar"
-JOGL_JAR_GL2_MAX="$JOGL_CORE jogl.gl2.$OSS.jar jogl.gl2.dbg.jar jogl.glu.tess.jar jogl.glu.mipmap.jar jogl.glu.gl2.jar jogl.util.gl2.jar $JOGL_AWT"
+JOGL_JAR_GL2_MAX="$JOGL_CORE jogl.gl2.$OSS.jar jogl.gl2.dbg.jar jogl.glu.tess.jar jogl.glu.mipmap.jar jogl.glu.gl2.jar jogl.util.gl2.jar $JOGL_AWT jogl.cg.jar"
JOGL_LIB_GL2_MIN="libjogl_gl2.so libnewt.so libnativewindow_x11.so libnativewindow_awt.so"
JOGL_LIB_GL2_MAX="libjogl_gl2.so libnewt.so libnativewindow_x11.so libnativewindow_awt.so"
export JOGL_JAR_ALL JOGL_JAR_ES1_MIN JOGL_JAR_ES1_MAX JOGL_JAR_ES2_MIN JOGL_JAR_ES2_MAX JOGL_JAR_GL2ES12_MIN JOGL_JAR_GL2ES12_MAX JOGL_JAR_GL2_MIN JOGL_JAR_GL2_MAX
export JOGL_LIB_ALL JOGL_LIB_ES1_MIN JOGL_LIB_ES1_MAX JOGL_LIB_ES2_MIN JOGL_LIB_ES2_MAX JOGL_LIB_GL2ES12_MIN JOGL_LIB_GL2ES12_MAX JOGL_LIB_GL2_MIN JOGL_LIB_GL2_MAX
-JOGL_JAR_DIR=""
-if [ ! -z "$1" ] ; then
- JOGL_JAR_DIR="$1"
- shift
-fi
-export JOGL_JAR_DIR
+THISDIR=`dirname $0`
+
+JOGL_PROFILE="$1"
+shift
-JOGL_LIB_DIR=$JOGL_JAR_DIR/nativewindow/obj:$JOGL_JAR_DIR/jogl/obj:$JOGL_JAR_DIR/newt/obj
+if [ -z "$JOGL_PROFILE" ] ; then
+ echo JOGL PROFILE missing
+ print_usage
+fi
+
+JOGL_BUILD_DIR="$1"
+shift
+
+AUTOBUILD=0
+
+if [ ! -z "$JOGL_BUILD_DIR" -a -e "$JOGL_BUILD_DIR" ] ; then
+ AUTOBUILD=0
+elif [ -e $THISDIR/../lib ] ; then
+ # Autobuild
+ JOGL_BUILD_DIR=$THISDIR/../lib
+ AUTOBUILD=1
+else
+ echo invalid JOGL_BUILD_DIR $JOGL_BUILD_DIR and no AUTOBUILD
+ print_usage
+fi
+export JOGL_BUILD_DIR
+
+JOGL_LIB_DIR=""
+if [ $AUTOBUILD -eq 0 ] ; then
+ JOGL_LIB_DIR=$JOGL_BUILD_DIR/nativewindow/obj:$JOGL_BUILD_DIR/jogl/obj:$JOGL_BUILD_DIR/newt/obj
+else
+ # Autobuild
+ JOGL_LIB_DIR=$THISDIR/../lib
+fi
export JOGL_LIB_DIR
-if [ ! -z "$1" ] ; then
- case "$1" in
+if [ ! -z "$JOGL_PROFILE" ] ; then
+ case "$JOGL_PROFILE" in
JOGL_ALL)
- JOGL_CLASSPATH=$(concat_jogl_list $JOGL_JAR_DIR $JOGL_JAR_ALL)
+ JOGL_CLASSPATH=$(concat_jogl_list $JOGL_BUILD_DIR $JOGL_JAR_ALL)
;;
JOGL_ES1_MIN)
- JOGL_CLASSPATH=$(concat_jogl_list $JOGL_JAR_DIR $JOGL_JAR_ES1_MIN)
+ JOGL_CLASSPATH=$(concat_jogl_list $JOGL_BUILD_DIR $JOGL_JAR_ES1_MIN)
JOGL_VBO_BUG=true ; export JOGL_VBO_BUG # ES emulation has buggy VBO impl.
;;
JOGL_ES1_MAX)
- JOGL_CLASSPATH=$(concat_jogl_list $JOGL_JAR_DIR $JOGL_JAR_ES1_MAX)
+ JOGL_CLASSPATH=$(concat_jogl_list $JOGL_BUILD_DIR $JOGL_JAR_ES1_MAX)
JOGL_VBO_BUG=true ; export JOGL_VBO_BUG # ES emulation has buggy VBO impl.
;;
JOGL_ES2_MIN)
- JOGL_CLASSPATH=$(concat_jogl_list $JOGL_JAR_DIR $JOGL_JAR_ES2_MIN)
+ JOGL_CLASSPATH=$(concat_jogl_list $JOGL_BUILD_DIR $JOGL_JAR_ES2_MIN)
JOGL_VBO_BUG=true ; export JOGL_VBO_BUG # ES emulation has buggy VBO impl.
;;
JOGL_ES2_MAX)
- JOGL_CLASSPATH=$(concat_jogl_list $JOGL_JAR_DIR $JOGL_JAR_ES2_MAX)
+ JOGL_CLASSPATH=$(concat_jogl_list $JOGL_BUILD_DIR $JOGL_JAR_ES2_MAX)
JOGL_VBO_BUG=true ; export JOGL_VBO_BUG # ES emulation has buggy VBO impl.
;;
JOGL_GL2ES12_MIN)
- JOGL_CLASSPATH=$(concat_jogl_list $JOGL_JAR_DIR $JOGL_JAR_GL2ES12_MIN)
+ JOGL_CLASSPATH=$(concat_jogl_list $JOGL_BUILD_DIR $JOGL_JAR_GL2ES12_MIN)
;;
JOGL_GL2ES12_MAX)
- JOGL_CLASSPATH=$(concat_jogl_list $JOGL_JAR_DIR $JOGL_JAR_GL2ES12_MAX)
+ JOGL_CLASSPATH=$(concat_jogl_list $JOGL_BUILD_DIR $JOGL_JAR_GL2ES12_MAX)
;;
JOGL_GL2_MIN)
- JOGL_CLASSPATH=$(concat_jogl_list $JOGL_JAR_DIR $JOGL_JAR_GL2_MIN)
+ JOGL_CLASSPATH=$(concat_jogl_list $JOGL_BUILD_DIR $JOGL_JAR_GL2_MIN)
;;
JOGL_GL2_MAX)
- JOGL_CLASSPATH=$(concat_jogl_list $JOGL_JAR_DIR $JOGL_JAR_GL2_MAX)
+ JOGL_CLASSPATH=$(concat_jogl_list $JOGL_BUILD_DIR $JOGL_JAR_GL2_MAX)
;;
esac
@@ -100,6 +131,6 @@ if [ ! -z "$1" ] ; then
fi
if [ -z "$JOGL_CLASSPATH" ] ; then
- echo "Usage: $0 <jogl-jar-dir> <jogl-lib-dir> {JOGL_ALL|JOGL_ES1_MIN|JOGL_ES1_MAX|JOGL_ES2_MIN|JOGL_ES2_MAX|JOGL_GL2ES12_MIN|JOGL_GL2ES12_MAX|JOGL_GL2_MIN|JOGL_GL2_MAX}"
+ print_usage
fi
diff --git a/make/build-jogl.xml b/make/build-jogl.xml
index 8f7a4ac5d..e23b9d594 100644
--- a/make/build-jogl.xml
+++ b/make/build-jogl.xml
@@ -37,7 +37,10 @@
-
- Optional properties:
- -Djogl.cg=1 when combined with the build or javadoc targets will cause
- - the experimental binding to NVidia's Cg language to be built.
+ - the experimental binding to NVidia's Cg language to be built.
+ - Then you need to define the location of your CG libraries:
+ - -Dwindows.cg.lib=<PATH> for Windows and
+ - -Dx11.cg.lib=<PATH> for X11/Unix
-
- Thanks to Rob Grzywinski and Artur Biesiadowski for the bulk of the
- ANT build, including the GlueGen and StaticGLInfo tasks, the building of
@@ -146,6 +149,11 @@
<!-- partitioning -->
+ <condition property="java.part.cg"
+ value="com/sun/opengl/cg/*">
+ <isset property="jogl.cg"/>
+ </condition>
+
<property name="java.part.egl"
value="com/sun/opengl/impl/egl/*"/>
@@ -225,6 +233,13 @@
<!-- condition excludes -->
+ <condition property="java.excludes.cg"
+ value="${java.part.cg}">
+ <not>
+ <isset property="jogl.cg"/>
+ </not>
+ </condition>
+
<condition property="java.excludes.egl"
value="${java.part.egl}">
<and>
@@ -289,14 +304,9 @@
<property name="java.excludes.fixme"
value="com/sun/opengl/impl/gl2/fixme/** com/sun/javafx/audio/windows/waveout/TestSpatialization.java" />
- <property name="java.excludes.all" value="${java.excludes.fixme} ${java.excludes.egl}, ${java.excludes.gl2}, ${java.excludes.gl3}, ${java.excludes.es1}, ${java.excludes.es2}, ${java.excludes.awt}, ${java.excludes.glugl2}, ${java.excludes.util}, ${java.excludes.x11}, ${java.excludes.win}, ${java.excludes.macosx}, ${java.excludes.cdcfp}" />
+ <property name="java.excludes.all" value="${java.excludes.fixme} ${java.excludes.cg}, ${java.excludes.egl}, ${java.excludes.gl2}, ${java.excludes.gl3}, ${java.excludes.es1}, ${java.excludes.es2}, ${java.excludes.awt}, ${java.excludes.glugl2}, ${java.excludes.util}, ${java.excludes.x11}, ${java.excludes.win}, ${java.excludes.macosx}, ${java.excludes.cdcfp}" />
<echo message="java.excludes.all: ${java.excludes.all}" />
- <!-- Cg determination -->
- <condition property="c.compiler.use-cglib">
- <isset property="jogl.cg" />
- </condition>
-
<!-- Set the project root directory to be up one directory. -->
<property name="project.root" value=".." />
@@ -460,6 +470,7 @@
<!-- The resulting jogl.jar. -->
<property name="jogl.core.jar" value="${build}/jogl.core.jar" />
+ <property name="jogl.cg.jar" value="${build}/jogl.cg.jar" />
<property name="jogl.gles1.jar" value="${build}/jogl.gles1.jar" />
<property name="jogl.gles1.dbg.jar" value="${build}/jogl.gles1.dbg.jar" />
<property name="jogl.gles2.jar" value="${build}/jogl.gles2.jar" />
@@ -1255,7 +1266,10 @@
<linker id="linker.cfg.linux.jogl.gl2" extends="linker.cfg.linux.jogl.x11">
<syslibset dir="/usr/X11R6/lib" libs="GL"/>
- <syslibset dir="${x11.cg.lib}" libs="Cg, CgGL" if="c.compiler.use-cglib"/>
+ </linker>
+
+ <linker id="linker.cfg.linux.jogl.cg" extends="linker.cfg.linux.jogl.gl2">
+ <syslibset dir="${x11.cg.lib}" libs="Cg, CgGL"/>
</linker>
<linker id="linker.cfg.linux.amd64.jogl.x11" extends="linker.cfg.linux.amd64">
@@ -1265,16 +1279,22 @@
<linker id="linker.cfg.linux.amd64.jogl.gl2" extends="linker.cfg.linux.amd64.jogl.x11">
<syslibset dir="/usr/X11R6/lib64" libs="GL"/>
- <syslibset dir="${x11.cg.lib}" libs="Cg, CgGL" if="c.compiler.use-cglib"/>
+ </linker>
+
+ <linker id="linker.cfg.linux.amd64.jogl.cg" extends="linker.cfg.linux.amd64.jogl.gl2">
+ <syslibset dir="${x11.cg.lib}" libs="Cg, CgGL"/>
</linker>
<linker id="linker.cfg.solaris.jogl.x11" extends="linker.cfg.solaris">
<syslibset libs="X11"/>
</linker>
- <linker id="linker.cfg.solaris.jogl.gl2" extends="linker.cfg.solaris">
+ <linker id="linker.cfg.solaris.jogl.gl2" extends="linker.cfg.solaris.jogl.x11">
<syslibset libs="GL"/>
- <syslibset dir="${x11.cg.lib}" libs="Cg, CgGL" if="c.compiler.use-cglib"/>
+ </linker>
+
+ <linker id="linker.cfg.solaris.jogl.cg" extends="linker.cfg.solaris.jogl.gl2">
+ <syslibset dir="${x11.cg.lib}" libs="Cg, CgGL"/>
</linker>
<linker id="linker.cfg.solaris.sparcv9.jogl.gl2" extends="linker.cfg.solaris.sparcv9">
@@ -1292,23 +1312,32 @@
<linker id="linker.cfg.win32.mingw.jogl" extends="linker.cfg.win32.mingw">
<linkerarg value="-Wl,--kill-at" /> <!-- remove @ from function names -->
<syslibset libs="opengl32, glu32, gdi32, kernel32"/>
- <syslibset dir="${windows.cg.lib}" libs="cg, cgGL" if="c.compiler.use-cglib"/>
+ </linker>
+
+ <linker id="linker.cfg.win32.mingw.jogl.cg" extends="linker.cfg.win32.mingw.jogl">
+ <syslibset dir="${windows.cg.lib}" libs="cg, cgGL"/>
</linker>
<linker id="linker.cfg.win32.msvc.jogl" extends="linker.cfg.win32.msvc">
<syslibset libs="opengl32, gdi32, user32, kernel32" />
- <syslibset dir="${windows.cg.lib}" libs="cg, cgGL" if="c.compiler.use-cglib"/>
<!-- This is temporary -->
<syslibset libs="winmm" />
</linker>
+ <linker id="linker.cfg.win32.msvc.jogl.cg" extends="linker.cfg.win32.msvc.jogl">
+ <syslibset dir="${windows.cg.lib}" libs="cg, cgGL"/>
+ </linker>
+
<linker id="linker.cfg.macosx.jogl" extends="linker.cfg.macosx">
<linkerarg value="-framework" />
<linkerarg value="Cocoa" />
<linkerarg value="-framework" />
<linkerarg value="OpenGL" />
- <linkerarg value="-framework" if="c.compiler.use-cglib" />
- <linkerarg value="Cg" if="c.compiler.use-cglib" />
+ </linker>
+
+ <linker id="linker.cfg.macosx.jogl.cg" extends="linker.cfg.macosx.jogl">
+ <linkerarg value="-framework"/>
+ <linkerarg value="Cg"/>
</linker>
<linker id="linker.cfg.hpux.jogl" extends="linker.cfg.hpux">
@@ -1323,6 +1352,7 @@
<property name="linker.cfg.id.core" value="linker.cfg.win32.msvc" />
<property name="linker.cfg.id.oswin" value="linker.cfg.win32.msvc.jogl" />
<property name="linker.cfg.id.gl2" value="linker.cfg.win32.msvc.jogl" />
+ <property name="linker.cfg.id.cg" value="linker.cfg.win32.msvc.jogl.cg" />
</target>
<target name="c.configure.win32.mingw" if="isMingW">
@@ -1331,6 +1361,7 @@
<property name="linker.cfg.id.core" value="linker.cfg.win32.mingw" />
<property name="linker.cfg.id.oswin" value="linker.cfg.win32.mingw.jogl" />
<property name="linker.cfg.id.gl2" value="linker.cfg.win32.mingw.jogl" />
+ <property name="linker.cfg.id.cg" value="linker.cfg.win32.mingw.jogl.cg" />
</target>
<target name="c.configure.linux.x86" if="isLinuxX86">
@@ -1339,6 +1370,7 @@
<property name="linker.cfg.id.core" value="linker.cfg.linux" />
<property name="linker.cfg.id.oswin" value="linker.cfg.linux.jogl.x11" />
<property name="linker.cfg.id.gl2" value="linker.cfg.linux.jogl.gl2" />
+ <property name="linker.cfg.id.cg" value="linker.cfg.linux.jogl.cg" />
</target>
<target name="c.configure.linux.amd64" if="isLinuxAMD64">
@@ -1347,6 +1379,7 @@
<property name="linker.cfg.id.core" value="linker.cfg.linux.amd64" />
<property name="linker.cfg.id.oswin" value="linker.cfg.linux.amd64.jogl.x11" />
<property name="linker.cfg.id.gl2" value="linker.cfg.linux.amd64.jogl.gl2" />
+ <property name="linker.cfg.id.cg" value="linker.cfg.linux.amd64.jogl.cg" />
</target>
<target name="c.configure.linux.ia64" if="isLinuxIA64">
@@ -1355,6 +1388,7 @@
<property name="linker.cfg.id.core" value="linker.cfg.linux" />
<property name="linker.cfg.id.oswin" value="linker.cfg.linux.jogl.x11" />
<property name="linker.cfg.id.gl2" value="linker.cfg.linux.jogl.gl2" />
+ <property name="linker.cfg.id.cg" value="linker.cfg.linux.jogl.cg" />
</target>
<target name="c.configure.linux" depends="c.configure.linux.x86,c.configure.linux.amd64,c.configure.linux.ia64,c.configure.x11" if="isLinux" />
@@ -1365,6 +1399,7 @@
<property name="linker.cfg.id.core" value="linker.cfg.solaris" />
<property name="linker.cfg.id.oswin" value="linker.cfg.solaris.jogl.x11" />
<property name="linker.cfg.id.gl2" value="linker.cfg.solaris.jogl.gl2" />
+ <property name="linker.cfg.id.cg" value="linker.cfg.solaris.jogl.cg" />
</target>
@@ -1374,6 +1409,7 @@
<property name="linker.cfg.id.core" value="linker.cfg.solaris.sparcv9" />
<property name="linker.cfg.id.oswin" value="linker.cfg.solaris.sparcv9.jogl.x11" />
<property name="linker.cfg.id.gl2" value="linker.cfg.solaris.sparcv9.jogl.gl2" />
+ <property name="linker.cfg.id.cg" value="linker.cfg.solaris.sparcv9.jogl.cg" />
</target>
@@ -1383,6 +1419,7 @@
<property name="linker.cfg.id.core" value="linker.cfg.solaris.amd64" />
<property name="linker.cfg.id.oswin" value="linker.cfg.solaris.amd64.jogl.x11" />
<property name="linker.cfg.id.gl2" value="linker.cfg.solaris.amd64.jogl.gl2" />
+ <property name="linker.cfg.id.cg" value="linker.cfg.solaris.amd64.jogl.cg" />
</target>
<target name="c.configure.freebsd" depends="c.configure.x11" if="isFreeBSD">
@@ -1391,6 +1428,7 @@
<property name="linker.cfg.id.core" value="linker.cfg.linux" />
<property name="linker.cfg.id.oswin" value="linker.cfg.linux.jogl.x11" />
<property name="linker.cfg.id.gl2" value="linker.cfg.linux.jogl.gl2" />
+ <property name="linker.cfg.id.cg" value="linker.cfg.linux.jogl.cg" />
</target>
<target name="c.configure.hpux" depends="c.configure.x11" if="isHPUX">
@@ -1399,6 +1437,7 @@
<property name="linker.cfg.id.core" value="linker.cfg.hpux" />
<property name="linker.cfg.id.oswin" value="linker.cfg.hpux.jogl.x11" />
<property name="linker.cfg.id.gl2" value="linker.cfg.hpux.jogl.gl2" />
+ <property name="linker.cfg.id.cg" value="linker.cfg.hpux.jogl.cg" />
</target>
<target name="c.configure.win32" depends="c.configure.win32.vc,c.configure.win32.mingw" if="isWindows" />
@@ -1410,6 +1449,7 @@
<property name="linker.cfg.id.core" value="linker.cfg.macosx" />
<property name="linker.cfg.id.oswin" value="linker.cfg.macosx.jogl" />
<property name="linker.cfg.id.gl2" value="linker.cfg.macosx.jogl" />
+ <property name="linker.cfg.id.cg" value="linker.cfg.macosx.jogl.cg" />
</target>
<target name="c.configure.2" depends="c.configure.win32,c.configure.linux,c.configure.solaris32,c.configure.solaris.sparcv9,c.configure.solaris.amd64,c.configure.macosx,c.configure.freebsd,c.configure.hpux" />
@@ -1528,7 +1568,7 @@
<includepath path="stub_includes/opengl"/>
<includepath path="stub_includes/egl"/>
<includepath path="stub_includes/openmax" if="useOpenMAX"/>
- <includepath path="stub_includes/cg" if="c.compiler.use-cglib"/>
+ <includepath path="stub_includes/cg" if="jogl.cg"/>
<!-- This is for the generated headers for handwritten C code -->
<includepath path="${src.generated.c}" />
@@ -1602,7 +1642,7 @@
<c.build c.compiler.src.files="c.src.files.cg"
output.lib.name="jogl_cg"
compiler.cfg.id="${compiler.cfg.id}"
- linker.cfg.id="${linker.cfg.id.gl2}"/>
+ linker.cfg.id="${linker.cfg.id.cg}"/>
</target>
<target name="c.manifest.cg" if="jogl.cg">
@@ -1632,141 +1672,147 @@
<!--
- Build the jogl.jar files.
-->
- <target name="jar" depends="java.compile,build-jars"/>
+ <target name="jar" depends="java.compile,build-jars,build-cg-jar"/>
<target name="setup-manifestfile">
- <condition property="manifestfile" value="joglRIversion">
- <isset property="jogl.ri" />
- </condition>
- <condition property="manifestfile" value="joglversion">
- <not>
- <isset property="jogl.ri" />
- </not>
- </condition>
- </target>
-
- <target name="build-jars" depends="setup-manifestfile">
+ <condition property="manifestfile" value="joglRIversion">
+ <isset property="jogl.ri" />
+ </condition>
+ <condition property="manifestfile" value="joglversion">
+ <not>
+ <isset property="jogl.ri" />
+ </not>
+ </condition>
<tstamp>
<format property="timestamp" pattern="yyyyMMdd-HH:mm:ss"/>
</tstamp>
<copy file="${manifestfile}"
- tofile="tempversion"
- overwrite="true">
- <filterset>
- <!-- This token only exists in the non-RI version of the manifest -->
- <filter token="VERSION" value="${jogl_base_version}-pre-${timestamp}"/>
- <!-- This token exists in both the RI and non-RI versions of the manifest -->
- <filter token="BASEVERSION" value="${jogl_base_version}"/>
- </filterset>
+ tofile="${build}/tempversion"
+ overwrite="true">
+ <filterset>
+ <!-- This token only exists in the non-RI version of the manifest -->
+ <filter token="VERSION" value="${jogl_base_version}-pre-${timestamp}"/>
+ <!-- This token exists in both the RI and non-RI versions of the manifest -->
+ <filter token="BASEVERSION" value="${jogl_base_version}"/>
+ </filterset>
</copy>
+ </target>
+
+ <target name="build-cg-jar" depends="setup-manifestfile" if="jogl.cg">
+ <jar manifest="${build}/tempversion" destfile="${jogl.cg.jar}">
+ <fileset dir="${classes}"
+ includes="${java.part.cg}"/>
+ </jar>
+ </target>
- <jar manifest="tempversion" destfile="${jogl.core.jar}">
+ <target name="build-jars" depends="setup-manifestfile">
+ <jar manifest="${build}/tempversion" destfile="${jogl.core.jar}">
<fileset dir="${classes}"
includes="javax/media/opengl/**, com/sun/gluegen/runtime/**, com/sun/opengl/**"
- excludes="${java.excludes.fixme} ${java.part.egl}, ${java.part.sdk}, ${java.part.openmax}, ${java.part.gl2es12.x11}, ${java.part.gl2es12.win}, ${java.part.gl2es12.osx}, ${java.part.gl2es12.dbg}, ${java.part.gl2.x11}, ${java.part.gl2.win}, ${java.part.gl2.osx}, ${java.part.gl2.dbg}, ${java.part.es1}, ${java.part.es1.dbg}, ${java.part.es2}, ${java.part.es2.dbg}, ${java.part.awt}, ${java.part.glutess}, ${java.part.glumipmap}, ${java.part.glugl2}, ${java.part.util} ${java.part.util.awt} ${java.part.util.gl2} ${java.part.util.glsl} ${java.part.util.fixedfuncemu}"/>
+ excludes="${java.excludes.fixme}, ${java.part.cg}, ${java.part.egl}, ${java.part.sdk}, ${java.part.openmax}, ${java.part.gl2es12.x11}, ${java.part.gl2es12.win}, ${java.part.gl2es12.osx}, ${java.part.gl2es12.dbg}, ${java.part.gl2.x11}, ${java.part.gl2.win}, ${java.part.gl2.osx}, ${java.part.gl2.dbg}, ${java.part.es1}, ${java.part.es1.dbg}, ${java.part.es2}, ${java.part.es2.dbg}, ${java.part.awt}, ${java.part.glutess}, ${java.part.glumipmap}, ${java.part.glugl2}, ${java.part.util} ${java.part.util.awt} ${java.part.util.gl2} ${java.part.util.glsl} ${java.part.util.fixedfuncemu}"/>
</jar>
- <jar manifest="tempversion" destfile="${jogl.gles1.jar}">
+ <jar manifest="${build}/tempversion" destfile="${jogl.gles1.jar}">
<fileset dir="${classes}"
includes="${java.part.es1}"
excludes="${java.part.es1.dbg}"/>
</jar>
- <jar manifest="tempversion" destfile="${jogl.gles1.dbg.jar}">
+ <jar manifest="${build}/tempversion" destfile="${jogl.gles1.dbg.jar}">
<fileset dir="${classes}"
includes="${java.part.es1.dbg}"/>
</jar>
- <jar manifest="tempversion" destfile="${jogl.gles2.jar}">
+ <jar manifest="${build}/tempversion" destfile="${jogl.gles2.jar}">
<fileset dir="${classes}"
includes="${java.part.es2}, ${java.part.openmax}"
excludes="${java.part.es2.dbg}"/>
</jar>
- <jar manifest="tempversion" destfile="${jogl.gles2.dbg.jar}">
+ <jar manifest="${build}/tempversion" destfile="${jogl.gles2.dbg.jar}">
<fileset dir="${classes}"
includes="${java.part.es2.dbg}"/>
</jar>
- <jar manifest="tempversion" destfile="${jogl.egl.jar}">
+ <jar manifest="${build}/tempversion" destfile="${jogl.egl.jar}">
<fileset dir="${classes}"
includes="${java.part.egl}"
excludes="${java.part.awt}"/>
</jar>
- <jar manifest="tempversion" destfile="${jogl.gl2es12.x11.jar}">
+ <jar manifest="${build}/tempversion" destfile="${jogl.gl2es12.x11.jar}">
<fileset dir="${classes}"
includes="${java.part.gl2es12.x11}, ${java.part.openmax}"
excludes="${java.part.gl2es12.dbg}, ${java.part.glugl2}"/>
</jar>
- <jar manifest="tempversion" destfile="${jogl.gl2es12.win.jar}">
+ <jar manifest="${build}/tempversion" destfile="${jogl.gl2es12.win.jar}">
<fileset dir="${classes}"
includes="${java.part.gl2es12.win}, ${java.part.openmax}"
excludes="${java.part.gl2es12.dbg}, ${java.part.glugl2}"/>
</jar>
- <jar manifest="tempversion" destfile="${jogl.gl2es12.osx.jar}">
+ <jar manifest="${build}/tempversion" destfile="${jogl.gl2es12.osx.jar}">
<fileset dir="${classes}"
includes="${java.part.gl2es12.osx}, ${java.part.openmax}"
excludes="${java.part.gl2es12.dbg}, ${java.part.glugl2}"/>
</jar>
- <jar manifest="tempversion" destfile="${jogl.gl2es12.dbg.jar}">
+ <jar manifest="${build}/tempversion" destfile="${jogl.gl2es12.dbg.jar}">
<fileset dir="${classes}"
includes="${java.part.gl2es12.dbg}"/>
</jar>
- <jar manifest="tempversion" destfile="${jogl.gl2.x11.jar}">
+ <jar manifest="${build}/tempversion" destfile="${jogl.gl2.x11.jar}">
<fileset dir="${classes}"
includes="${java.part.gl2.x11}, ${java.part.gl3}, ${java.part.openmax}"
excludes="${java.part.gl2.dbg}, ${java.part.glugl2}"/>
</jar>
- <jar manifest="tempversion" destfile="${jogl.gl2.win.jar}">
+ <jar manifest="${build}/tempversion" destfile="${jogl.gl2.win.jar}">
<fileset dir="${classes}"
includes="${java.part.gl2.win}, $${java.part.gl3}, {java.part.openmax}"
excludes="${java.part.gl2.dbg}, ${java.part.glugl2}"/>
</jar>
- <jar manifest="tempversion" destfile="${jogl.gl2.osx.jar}">
+ <jar manifest="${build}/tempversion" destfile="${jogl.gl2.osx.jar}">
<fileset dir="${classes}"
includes="${java.part.gl2.osx}, $${java.part.gl3}, {java.part.openmax}"
excludes="${java.part.gl2.dbg}, ${java.part.glugl2}"/>
</jar>
- <jar manifest="tempversion" destfile="${jogl.gl2.dbg.jar}">
+ <jar manifest="${build}/tempversion" destfile="${jogl.gl2.dbg.jar}">
<fileset dir="${classes}"
includes="${java.part.gl2.dbg}"/>
</jar>
- <jar manifest="tempversion" destfile="${jogl.sdk.jar}">
+ <jar manifest="${build}/tempversion" destfile="${jogl.sdk.jar}">
<fileset dir="${classes}"
includes="${java.part.sdk}"/>
</jar>
- <jar manifest="tempversion" destfile="${jogl.glutess.jar}">
+ <jar manifest="${build}/tempversion" destfile="${jogl.glutess.jar}">
<fileset dir="${classes}"
includes="${java.part.glutess}"/>
</jar>
- <jar manifest="tempversion" destfile="${jogl.glumipmap.jar}">
+ <jar manifest="${build}/tempversion" destfile="${jogl.glumipmap.jar}">
<fileset dir="${classes}"
includes="${java.part.glumipmap}"/>
</jar>
- <jar manifest="tempversion" destfile="${jogl.glugl2.jar}">
+ <jar manifest="${build}/tempversion" destfile="${jogl.glugl2.jar}">
<fileset dir="${classes}"
includes="${java.part.glugl2}"/>
</jar>
- <jar manifest="tempversion" destfile="${jogl.awt.jar}">
+ <jar manifest="${build}/tempversion" destfile="${jogl.awt.jar}">
<fileset dir="${classes}"
includes="${java.part.awt}" />
</jar>
- <jar manifest="tempversion" destfile="${jogl.util.jar}">
+ <jar manifest="${build}/tempversion" destfile="${jogl.util.jar}">
<fileset dir="${classes}"
includes="${java.part.util}, ${java.part.util.glsl}"
excludes="${java.part.util.awt}, ${java.part.util.gl2}, ${java.part.gl3}, ${java.part.util.fixedfuncemu}"/>
</jar>
- <jar manifest="tempversion" destfile="${jogl.util.gl2.jar}">
+ <jar manifest="${build}/tempversion" destfile="${jogl.util.gl2.jar}">
<fileset dir="${classes}"
includes="${java.part.util.gl2}"
excludes="com/sun/opengl/**/awt/**"/>
</jar>
- <jar manifest="tempversion" destfile="${jogl.util.awt.jar}">
+ <jar manifest="${build}/tempversion" destfile="${jogl.util.awt.jar}">
<fileset dir="${classes}"
includes="${java.part.util.awt}"/>
</jar>
- <jar manifest="tempversion" destfile="${jogl.util.fixedfuncemu.jar}">
+ <jar manifest="${build}/tempversion" destfile="${jogl.util.fixedfuncemu.jar}">
<fileset dir="${classes}"
includes="${java.part.util.fixedfuncemu}"/>
<fileset dir="${src.java}"
includes="${java.part.util.fixedfuncemu.shadercode}"/>
</jar>
- <jar manifest="tempversion" destfile="${jogl.all.jar}">
+ <jar manifest="${build}/tempversion" destfile="${jogl.all.jar}">
<fileset dir="${classes}">
<include name="javax/media/opengl/**" />
<include name="com/sun/gluegen/runtime/**" />
@@ -1778,7 +1824,6 @@
<fileset dir="${src.java}"
includes="${java.part.util.fixedfunc.shaders}"/>
</jar>
- <delete file="tempversion"/>
</target>
<!-- ================================================================== -->
diff --git a/make/build.xml b/make/build.xml
index 30ca60cfe..a3f0530d1 100644
--- a/make/build.xml
+++ b/make/build.xml
@@ -124,6 +124,11 @@
<fileset dir="${build}/newt" includes="*.jar" excludes="*natives*.jar" />
<fileset dir="${build}/newt/obj" includes="*.${native.library.suffix}" />
</copy>
+ <mkdir dir="${archive.dir}/etc" />
+ <copy todir="${archive.dir}/etc">
+ <fileset dir="${project.root}/etc" includes="*" />
+ </copy>
+ <delete quiet="true" file="${build}/${archive.name}.zip"/>
<zip destfile="${build}/${archive.name}.zip"
basedir="${build}"
includes="${archive.name}/**" />
@@ -143,6 +148,7 @@
archiving binary bits from other rootrel.build settings in the source archive.
This is inevitable given that we don't want to specialize this target to
explicitly include top level files and directories, to make it future-proof. -->
+ <delete quiet="true" file="${build}/jogl-${tmp.version}-src.zip"/>
<zip destfile="${build}/jogl-${tmp.version}-src.zip"
basedir="${project.root}/.."
excludes="gluegen/${rootrel.build}/**,gluegen/build/**gluegen/build-temp/**,jogl/${rootrel.build}/**,jogl/build/**,jogl/build-temp/**,jogl/www/**"
diff --git a/make/make.jogl.all.linux-x86.sh b/make/make.jogl.all.linux-x86.sh
index 91170c79e..feb9f27e8 100644
--- a/make/make.jogl.all.linux-x86.sh
+++ b/make/make.jogl.all.linux-x86.sh
@@ -2,12 +2,13 @@
. ../../setenv-build-jogl-x86.sh
+# -Djogl.cg=1 -Dx11.cg.lib=../../lib-linux-x86_64
# -Dc.compiler.debug=true
# -DuseOpenMAX=true \
# -Dbuild.noarchives=true
ant \
- -Dbuild.noarchives=true \
+ -Djogl.cg=1 -Dx11.cg.lib=../../lib-linux-x86 \
-Drootrel.build=build-x86 \
-Dgluegen.cpptasks.detected.os=true \
-DisUnix=true \
diff --git a/make/make.jogl.all.linux-x86_64.sh b/make/make.jogl.all.linux-x86_64.sh
index 4bc5d745d..c84a2926c 100644
--- a/make/make.jogl.all.linux-x86_64.sh
+++ b/make/make.jogl.all.linux-x86_64.sh
@@ -2,12 +2,13 @@
. ../../setenv-build-jogl-x86_64.sh
+# -Djogl.cg=1 -Dx11.cg.lib=../../lib-linux-x86_64
# -Dc.compiler.debug=true
# -Dbuild.noarchives=true
ant \
+ -Djogl.cg=1 -Dx11.cg.lib=../../lib-linux-x86_64 \
-Dc.compiler.debug=true \
- -Dbuild.noarchives=true \
-Drootrel.build=build-x86_64 \
-Dgluegen.cpptasks.detected.os=true \
-DisUnix=true \
diff --git a/make/make.jogl.all.macosx.sh b/make/make.jogl.all.macosx.sh
index c94d2d18a..037f4233a 100644
--- a/make/make.jogl.all.macosx.sh
+++ b/make/make.jogl.all.macosx.sh
@@ -6,6 +6,6 @@
# -Dbuild.noarchives=true
ant \
- -Dbuild.noarchives=true \
+ -Djogl.cg=1 \
-Drootrel.build=build-macosx \
$* 2>&1 | tee make.jogl.all.macosx.log
diff --git a/make/make.jogl.all.win32.bat b/make/make.jogl.all.win32.bat
index 54475db06..c53007f44 100644
--- a/make/make.jogl.all.win32.bat
+++ b/make/make.jogl.all.win32.bat
@@ -7,5 +7,6 @@ set CLASSPATH=.;%THISDIR%\build-win32\classes
REM -Dc.compiler.debug=true
REM -DuseOpenMAX=true
REM -DuseKD=true
+REM -Djogl.cg=1 -D-Dwindows.cg.lib=C:\Cg-2.2
-ant -Drootrel.build=build-win32 > make.jogl.all.win32.log 2>&1
+ant -Drootrel.build=build-win32 -Djogl.cg=1 -D-Dwindows.cg.lib=C:\Cg-2.2 > make.jogl.all.win32.log 2>&1
diff --git a/make/versions.xml b/make/versions.xml
index 75c035f5a..0ee07bfe0 100644
--- a/make/versions.xml
+++ b/make/versions.xml
@@ -19,6 +19,7 @@
official release builds and intermediate release builds, but
commented out for nightly builds. -->
<!-- <property name="jogl.ri" value="true" /> -->
+ <property name="jogl.ri" value="true" />
<!-- Base version of the NativeWindow interface, following the same
rules as above -->
@@ -30,6 +31,7 @@
official release builds and intermediate release builds, but
commented out for nightly builds. -->
<!-- <property name="nativewindow.ri" value="true" /> -->
+ <property name="nativewindow.ri" value="true" />
<!-- Base version of the Newt library, following the same
rules as above -->
@@ -42,5 +44,6 @@
official release builds and intermediate release builds, but
commented out for nightly builds. -->
<!-- <property name="newt.ri" value="true" /> -->
+ <property name="newt.ri" value="true" />
</project>
diff --git a/src/nativewindow/classes/javax/media/nativewindow/x11/X11GraphicsScreen.java b/src/nativewindow/classes/javax/media/nativewindow/x11/X11GraphicsScreen.java
index 34bc48f99..45146d33e 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/x11/X11GraphicsScreen.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/x11/X11GraphicsScreen.java
@@ -56,9 +56,14 @@ public class X11GraphicsScreen extends DefaultGraphicsScreen implements Cloneabl
/** Creates a new X11GraphicsScreen using a thread local display connection */
public static AbstractGraphicsScreen createDefault() {
- long display = X11Util.getThreadLocalDefaultDisplay();
- int scrnIdx = X11Lib.DefaultScreen(display);
- return createScreenDevice(display, scrnIdx);
+ NativeWindowFactory.getDefaultFactory().getToolkitLock().lock();
+ try {
+ long display = X11Util.getThreadLocalDefaultDisplay();
+ int scrnIdx = X11Lib.DefaultScreen(display);
+ return createScreenDevice(display, scrnIdx);
+ } finally {
+ NativeWindowFactory.getDefaultFactory().getToolkitLock().unlock();
+ }
}
public long getDefaultVisualID() {
@@ -74,8 +79,14 @@ public class X11GraphicsScreen extends DefaultGraphicsScreen implements Cloneabl
}
private static int fetchScreen(X11GraphicsDevice device, int screen) {
- if(!X11Lib.XineramaEnabled(device.getHandle())) {
- return screen;
+ // It still could be an AWT hold handle ..
+ NativeWindowFactory.getDefaultFactory().getToolkitLock().lock();
+ try {
+ if(!X11Lib.XineramaEnabled(device.getHandle())) {
+ return screen;
+ }
+ } finally {
+ NativeWindowFactory.getDefaultFactory().getToolkitLock().unlock();
}
return 0;
}