summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2009-09-25 12:29:16 -0700
committerSven Gothel <[email protected]>2009-09-25 12:29:16 -0700
commitc752f7117dc38eed1caa870d7c96a084cea04f88 (patch)
tree6b238f787c0b8c01cf209f495541b4bf7e44407f
parentb4b7d23fd7a6e1bb8c6545a0e82d811244b5e2a7 (diff)
Fix generic no awt test case
-rwxr-xr-xjava-dbg-noawt.sh24
-rwxr-xr-xjava-run-noawt.sh22
-rw-r--r--src/demos/swt/Snippet209.java1
3 files changed, 47 insertions, 0 deletions
diff --git a/java-dbg-noawt.sh b/java-dbg-noawt.sh
new file mode 100755
index 0000000..2282348
--- /dev/null
+++ b/java-dbg-noawt.sh
@@ -0,0 +1,24 @@
+#! /bin/sh
+
+MOSX=0
+uname -a | grep -i Darwin && MOSX=1
+
+CPOK=0
+echo $CLASSPATH | grep jogl && CPOK=1
+
+if [ $CPOK -eq 0 ] ; then
+ # Only valid for autobuild .. otherwise run manually with build-dir
+ . ./setenv-jogl.sh JOGL_ALL
+ echo $CLASSPATH | grep jogl && CPOK=1
+fi
+if [ $CPOK -eq 0 ] ; then
+ echo No JOGL in CLASSPATH
+else
+ # D_ARGS="-Dgluegen.debug.ProcAddressHelper=true -Dgluegen.debug.NativeLibrary=true -Dnativewindow.debug=all -Djogl.debug=all -Dnewt.debug=all"
+ D_ARGS="-Dnativewindow.debug=all -Djogl.debug=all -Dnewt.debug=all -Djogl.debug.GLSLState"
+ if [ $MOSX -eq 1 ] ; then
+ X_ARGS="-XstartOnFirstThread"
+ fi
+
+ java $X_ARGS -Djava.awt.headless=true $D_ARGS $* 2>&1 | tee java-dbg-noawt.log
+fi
diff --git a/java-run-noawt.sh b/java-run-noawt.sh
new file mode 100755
index 0000000..a895914
--- /dev/null
+++ b/java-run-noawt.sh
@@ -0,0 +1,22 @@
+#! /bin/sh
+
+MOSX=0
+uname -a | grep -i Darwin && MOSX=1
+
+CPOK=0
+echo $CLASSPATH | grep jogl && CPOK=1
+
+if [ $CPOK -eq 0 ] ; then
+ # Only valid for autobuild .. otherwise run manually with build-dir
+ . ./setenv-jogl.sh JOGL_ALL
+ echo $CLASSPATH | grep jogl && CPOK=1
+fi
+if [ $CPOK -eq 0 ] ; then
+ echo No JOGL in CLASSPATH
+else
+ if [ $MOSX -eq 1 ] ; then
+ X_ARGS="-XstartOnFirstThread"
+ fi
+
+ java $X_ARGS -Djava.awt.headless=true $* 2>&1 | tee java-run-noawt.log
+fi
diff --git a/src/demos/swt/Snippet209.java b/src/demos/swt/Snippet209.java
index d4238e2..f75d59d 100644
--- a/src/demos/swt/Snippet209.java
+++ b/src/demos/swt/Snippet209.java
@@ -95,6 +95,7 @@ public class Snippet209 {
context.makeCurrent();
GL2 gl = context.getGL().getGL2();
+ gl.setSwapInterval(1);
gl.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
gl.glColor3f(1.0f, 0.0f, 0.0f);
gl.glHint(gl.GL_PERSPECTIVE_CORRECTION_HINT, gl.GL_NICEST);