aboutsummaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
Diffstat (limited to 'etc')
-rwxr-xr-xetc/profile.jogl174
-rwxr-xr-xetc/test.bat19
-rwxr-xr-xetc/test.sh48
3 files changed, 241 insertions, 0 deletions
diff --git a/etc/profile.jogl b/etc/profile.jogl
new file mode 100755
index 000000000..dec12969c
--- /dev/null
+++ b/etc/profile.jogl
@@ -0,0 +1,174 @@
+#! /bin/sh
+
+function print_usage()
+{
+ echo "Usage: $0 {JOGL_ALLALL|JOGL_ALL|JOGL_ALL_NOAWT|JOGL_ES1_MIN|JOGL_ES1_MAX|JOGL_ES2_MIN|JOGL_ES2_MAX|JOGL_GL2ES12_MIN|JOGL_GL2ES12_MAX|JOGL_GLDESKTOP_MIN|JOGL_GLDESKTOP_MAX} [jogl-build-dir]"
+}
+
+function concat_jogl_list()
+{
+ ITEMDIR=$1
+ shift
+ 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
+ JOGL_LIST=$j/$i
+ else
+ JOGL_LIST=$JOGL_LIST:$j/$i
+ fi
+ fi
+ done
+ done
+ echo $JOGL_LIST
+}
+
+ARCH=`uname -m`
+KERNEL=`uname -s | awk ' { printf "%s",tolower($0) ; } '`
+
+uname -a | grep -i LINUX && OSS=x11
+uname -a | grep -i Darwin && OSS=osx
+uname -a | grep -i CYGWIN && OSS=win
+
+JOGL_AWT="jogl.awt.jar jogl.util.awt.jar newt.awt.jar nativewindow.awt.jar"
+
+JOGL_CORE="nativewindow.core.jar nativewindow.os.$OSS.jar jogl.core.jar jogl.os.$OSS.jar newt.core.jar newt.os.$OSS.jar newt.ogl.jar jogl.util.jar"
+
+JOGL_TEST="jogl.test.jar"
+
+JOGL_JAR_ALL_NOAWT="$JOGL_CORE jogl.gles1.jar jogl.gles1.dbg.jar jogl.gles2.jar jogl.gles2.dbg.jar jogl.egl.jar jogl.os.$OSS.jar jogl.gl2es12.jar jogl.gldesktop.jar jogl.gldesktop.dbg.jar jogl.util.gldesktop.jar jogl.glu.tess.jar jogl.glu.mipmap.jar jogl.glu.gldesktop.jar jogl.util.gldesktop.jar jogl.util.fixedfuncemu.jar jogl.cg.jar"
+JOGL_JAR_ALL="$JOGL_JAR_ALL_NOAWT $JOGL_AWT"
+JOGL_LIB_ALL="libjogl_desktop.so libjogl_es1.so libjogl_es2.so libnewt.so libjogl_awt.so"
+
+JOGL_JAR_ES1_MIN="$JOGL_CORE jogl.gles1.jar jogl.gles1.dbg.jar jogl.egl.jar"
+JOGL_JAR_ES1_MAX="$JOGL_CORE jogl.gles1.jar jogl.gles1.dbg.jar jogl.egl.jar jogl.glu.tess.jar jogl.glu.mipmap.jar $JOGL_AWT"
+JOGL_LIB_ES1_MIN="libjogl_es1.so libnewt.so"
+JOGL_LIB_ES1_MAX="libjogl_es1.so libnewt.so libjogl_awt.so libnativewindow_x11.so libnativewindow_awt.so"
+
+JOGL_JAR_ES2_MIN="$JOGL_CORE jogl.gles2.jar jogl.gles2.dbg.jar jogl.egl.jar jogl.util.fixedfuncemu.jar"
+JOGL_JAR_ES2_MAX="$JOGL_CORE jogl.gles2.jar jogl.gles2.dbg.jar jogl.egl.jar jogl.util.fixedfuncemu.jar jogl.glu.tess.jar $JOGL_AWT"
+JOGL_LIB_ES2_MIN="libjogl_es2.so libnewt.so"
+JOGL_LIB_ES2_MAX="libjogl_es2.so libnewt.so libjogl_awt.so libnativewindow_x11.so libnativewindow_awt.so"
+
+JOGL_JAR_GL2ES12_MIN="$JOGL_CORE jogl.os.$OSS.jar jogl.gl2es12.jar jogl.gles1.dbg.jar jogl.gles2.dbg.jar jogl.util.fixedfuncemu.jar"
+JOGL_JAR_GL2ES12_MAX="$JOGL_CORE jogl.os.$OSS.jar jogl.gl2es12.jar jogl.gles1.dbg.jar jogl.gles2.dbg.jar jogl.util.fixedfuncemu.jar jogl.gl2es12.dbg.jar jogl.glu.tess.jar jogl.glu.mipmap.jar $JOGL_AWT"
+JOGL_LIB_GL2ES12_MIN="libjogl_gl2es12.so libnewt.so libnativewindow_x11.so libnativewindow_awt.so"
+JOGL_LIB_GL2ES12_MAX="libjogl_gl2es12.so libnewt.so libnativewindow_x11.so libnativewindow_awt.so"
+
+JOGL_JAR_GLDESKTOP_MIN="$JOGL_CORE jogl.os.$OSS.jar jogl.gldesktop.jar jogl.gldesktop.dbg.jar"
+JOGL_JAR_GLDESKTOP_MAX="$JOGL_CORE jogl.os.$OSS.jar jogl.gldesktop.jar jogl.gldesktop.dbg.jar jogl.glu.tess.jar jogl.glu.mipmap.jar jogl.glu.gldesktop.jar jogl.util.gldesktop.jar $JOGL_AWT jogl.cg.jar"
+JOGL_LIB_GLDESKTOP_MIN="libjogl_desktop.so libnewt.so libnativewindow_x11.so libnativewindow_awt.so"
+JOGL_LIB_GLDESKTOP_MAX="libjogl_desktop.so libnewt.so libnativewindow_x11.so libnativewindow_awt.so"
+
+export JOGL_JAR_ALL JOGL_JAR_ALL_NOAWT 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_GLDESKTOP_MIN JOGL_JAR_GLDESKTOP_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_GLDESKTOP_MIN JOGL_LIB_GLDESKTOP_MAX
+
+THISDIR=`dirname $0`
+
+JOGL_PROFILE="$1"
+shift
+
+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/jar ] ; then
+ # Autobuild
+ JOGL_BUILD_DIR=$THISDIR/jar
+ 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 "$JOGL_PROFILE" ] ; then
+ case "$JOGL_PROFILE" in
+ JOGL_ALLALL)
+ JOGL_CLASSPATH=$(concat_jogl_list $JOGL_BUILD_DIR gluegen-rt.jar nativewindow.all.jar jogl.all.jar newt.all.jar $JOGL_TEST)
+ ;;
+ JOGL_ALL)
+ JOGL_CLASSPATH=$(concat_jogl_list $JOGL_BUILD_DIR $JOGL_JAR_ALL $JOGL_TEST)
+ ;;
+ JOGL_ALL_NOAWT)
+ JOGL_CLASSPATH=$(concat_jogl_list $JOGL_BUILD_DIR $JOGL_JAR_ALL_NOAWT)
+ ;;
+ JOGL_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_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_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_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_BUILD_DIR $JOGL_JAR_GL2ES12_MIN)
+ ;;
+ JOGL_GL2ES12_MAX)
+ JOGL_CLASSPATH=$(concat_jogl_list $JOGL_BUILD_DIR $JOGL_JAR_GL2ES12_MAX)
+ ;;
+ JOGL_GLDESKTOP_MIN)
+ JOGL_CLASSPATH=$(concat_jogl_list $JOGL_BUILD_DIR $JOGL_JAR_GLDESKTOP_MIN)
+ ;;
+ JOGL_GLDESKTOP_MAX)
+ JOGL_CLASSPATH=$(concat_jogl_list $JOGL_BUILD_DIR $JOGL_JAR_GLDESKTOP_MAX)
+ ;;
+ esac
+
+ export JOGL_CLASSPATH
+fi
+
+if [ "$KERNEL" = "linux" ] ; then
+ SWT_SUB="gtk"
+elif [ "$KERNEL" = "darwin" ] ; then
+ SWT_SUB="cocoa"
+fi
+if [ -z "$SWT_CLASSPATH" ] ; then
+ SWT_CLASSPATH_0=$JOGL_BUILD_DIR/../make/lib/swt/$SWT_SUB-$KERNEL-$ARCH/swt-debug.jar
+ SWT_CLASSPATH_1=$HOME/.java/swt.jar
+ if [ ! -e "$SWT_CLASSPATH_0" ] ; then
+ echo Info: NO JOGL SWT $SWT_CLASSPATH_0
+ if [ ! -e "$SWT_CLASSPATH_1" ] ; then
+ echo Info: NO Users SWT $SWT_CLASSPATH_1
+ else
+ export SWT_CLASSPATH=$SWT_CLASSPATH_1
+ echo Info: Using Users SWT $SWT_CLASSPATH
+ fi
+ else
+ export SWT_CLASSPATH=$SWT_CLASSPATH_0
+ echo Info: Using JOGL SWT $SWT_CLASSPATH
+ fi
+ if [ ! -z "$SWT_CLASSPATH" ] ; then
+ export SWT_CLASSPATH
+ fi
+fi
+
+if [ -z "$JOGL_CLASSPATH" ] ; then
+ print_usage
+fi
+
diff --git a/etc/test.bat b/etc/test.bat
new file mode 100755
index 000000000..aa19ad970
--- /dev/null
+++ b/etc/test.bat
@@ -0,0 +1,19 @@
+
+set BLD_DIR=jar
+set LIB_DIR=lib
+
+set CP_ALL=.;%BLD_DIR%\gluegen-rt.jar;%BLD_DIR%\nativewindow.all.jar;%BLD_DIR%\jogl.all.jar;%BLD_DIR%\newt.all.jar
+echo CP_ALL %CP_ALL%
+
+set X_ARGS="-Dsun.java2d.noddraw=true" "-Dsun.awt.noerasebackground=true"
+
+REM java -classpath %CP_ALL% "-Djava.library.path=%LIB_DIR%" %X_ARGS% javax.media.opengl.awt.GLCanvas > java-win64.log 2>&1
+
+REM java -classpath %CP_ALL% "-Djava.library.path=%LIB_DIR%" %X_ARGS% com.jogamp.common.GlueGenVersion > test.log 2>&1
+REM java -classpath %CP_ALL% "-Djava.library.path=%LIB_DIR%" %X_ARGS% com.jogamp.nativewindow.NativeWindowVersion >> test.log 2>&1
+REM java -classpath %CP_ALL% "-Djava.library.path=%LIB_DIR%" %X_ARGS% com.jogamp.opengl.JoglVersion >> test.log 2>&1
+REM java -classpath %CP_ALL% "-Djava.library.path=%LIB_DIR%" %X_ARGS% com.jogamp.newt.NewtVersion >> test.log 2>&1
+REM java -classpath %CP_ALL% "-Djava.library.path=%LIB_DIR%" %X_ARGS% com.jogamp.newt.opengl.GLCanvas >> test.log 2>&1
+java -classpath %CP_ALL% "-Djava.library.path=%LIB_DIR%" %X_ARGS% com.jogamp.newt.opengl.GLWindow >> test.log 2>&1
+
+type test.log
diff --git a/etc/test.sh b/etc/test.sh
new file mode 100755
index 000000000..09b97ce69
--- /dev/null
+++ b/etc/test.sh
@@ -0,0 +1,48 @@
+#! /bin/bash
+
+THISDIR=`pwd`
+logfile=`basename $0 .sh`.log
+
+rm -f $logfile
+
+which java 2>&1 | tee -a $logfile
+java -version 2>&1 | tee -a $logfile
+echo LIBXCB_ALLOW_SLOPPY_LOCK: $LIBXCB_ALLOW_SLOPPY_LOCK 2>&1 | tee -a $logfile
+echo LIBGL_DRIVERS_PATH: $LIBGL_DRIVERS_PATH 2>&1 | tee -a $logfile
+echo LIBGL_DEBUG: $LIBGL_DEBUG 2>&1 | tee -a $logfile
+echo java $X_ARGS $D_ARGS $* 2>&1 | tee -a $logfile
+
+CLASSPATH=jar/gluegen-rt.jar:jar/nativewindow.all.jar:jar/jogl.all.jar:jar/newt.all.jar
+export CLASSPATH
+
+export LD_LIBRARY_PATH=./lib:$LD_LIBRARY_PATH
+export DYLD_LIBRARY_PATH=./lib:$DYLD_LIBRARY_PATH
+echo LD_LIBRARY PATH: $LD_LIBRARY_PATH
+echo DYLD_LIBRARY PATH: $DYLD_LIBRARY_PATH
+echo
+
+echo CLASSPATH: $CLASSPATH
+echo
+
+# D_ARGS="-Djogamp.debug.TraceLock"
+# D_ARGS="-Dnewt.debug.EDT -Dnativewindow.debug.ToolkitLock.TraceLock -Dnativewindow.debug.NativeWindow"
+# D_ARGS="-Dnewt.debug.Window -Dnewt.debug.Display -Dnewt.debug.EDT"
+# D_ARGS="-Dnewt.debug.EDT -Dnativewindow.debug.ToolkitLock.TraceLock -Dnativewindow.debug.X11Util.TraceDisplayLifecycle=true"
+#D_ARGS="-Djogamp.common.utils.locks.Lock.timeout=600000 -Djogamp.debug.Lock -Djogamp.debug.Lock.TraceLock"
+# D_ARGS="-Dnewt.debug.Window -Dnewt.debug.EDT -Dnewt.debug.Display "
+#D_ARGS="-Dnewt.debug.EDT -Djogamp.common.utils.locks.Lock.timeout=600000 -Djogl.debug.Animator -Dnewt.debug.Display -Dnewt.debug.Screen"
+#D_ARGS="-Dnewt.debug.EDT -Dnewt.debug.Display -Dnativewindow.debug.X11Util -Djogl.debug.GLDrawable -Djogl.debug.GLCanvas"
+#D_ARGS="-Dnewt.debug.EDT -Djogl.debug.GLContext"
+#D_ARGS="-Dnewt.debug.Screen -Dnewt.debug.EDT -Djogamp.debug.Lock"
+#D_ARGS="-Dnewt.debug.EDT"
+#D_ARGS="-Dnewt.debug.EDT -Djogl.debug=all -Dnativewindow.debug=all"
+# D_ARGS="-Djogl.debug=all"
+X_ARGS="-Dsun.java2d.noddraw=true -Dsun.java2d.opengl=false"
+
+#java $X_ARGS $ARGS_AWT $D_ARGS com.jogamp.common.GlueGenVersion 2>&1 | tee -a $logfile
+#java $X_ARGS $ARGS_AWT $D_ARGS com.jogamp.nativewindow.NativeWindowVersion 2>&1 | tee -a $logfile
+#java $X_ARGS $ARGS_AWT $D_ARGS com.jogamp.opengl.JoglVersion 2>&1 | tee -a $logfile
+#java $X_ARGS $ARGS_AWT $D_ARGS com.jogamp.newt.NewtVersion 2>&1 | tee -a $logfile
+#java $X_ARGS $ARGS_AWT $D_ARGS javax.media.opengl.awt.GLCanvas 2>&1 | tee -a $logfile
+java $X_ARGS $ARGS_NEWT $D_ARGS com.jogamp.newt.opengl.GLWindow 2>&1 | tee -a $logfile
+