summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsg215889 <[email protected]>2009-07-13 02:12:16 -0700
committersg215889 <[email protected]>2009-07-13 02:12:16 -0700
commita29817b54313d481abd6a594262159a589ce743b (patch)
tree6baabfbf1dbb0352d670493aeff5acee2d73490c
parent12a185ccdf8c306c7cbdcafb9a0364cd9d1a4354 (diff)
Add CDC/CVM support ..
-rwxr-xr-xcvm-dbg-newt.sh21
-rwxr-xr-xcvm-run-newt.sh18
-rw-r--r--make/make.jogl.cdcfp.macosx.sh10
-rw-r--r--make/make.jogl.cdcfp.x86.sh10
-rwxr-xr-xsrc/demos/applets/RedSquareNEWTAWTApplet.java33
-rw-r--r--www/applet-redsquare-newtawt-next.html34
-rw-r--r--www/applet-redsquare-newtawt-next.jnlp26
7 files changed, 152 insertions, 0 deletions
diff --git a/cvm-dbg-newt.sh b/cvm-dbg-newt.sh
new file mode 100755
index 0000000..0469627
--- /dev/null
+++ b/cvm-dbg-newt.sh
@@ -0,0 +1,21 @@
+#! /bin/sh
+
+CVM=$1
+shift
+
+JOGL_LIB_DIR=$1
+shift
+
+BUILD_SUBDIR=$1
+shift
+
+if [ ! -x "$CVM" -o -z "$JOGL_LIB_DIR" -o -z "$BUILD_SUBDIR" ] ; then
+ echo Usage $0 CVM-Binary JOGL_LIB_DIR BUILD_SUB_PATH
+ echo e.g. $0 ../CVM/bin/cvm ../jogl/build-cdcfp-x86/lib build-cdcfp-x86
+ exit 1
+fi
+
+# D_ARGS="-Dgluegen.debug.ProcAddressHelper=true -Dgluegen.debug.NativeLibrary=true -Dnativewindow.debug=all -Djogl.debug=all -Dnewt.debug=all"
+D_ARGS="-Dgluegen.debug.NativeLibrary=true -Dnativewindow.debug=all -Djogl.debug=all -Dnewt.debug=all"
+
+$CVM -Djava.awt.headless=true $D_ARGS -Dsun.boot.library.path=$JOGL_LIB_DIR -Xbootclasspath/a:../gluegen/$BUILD_SUBDIR/gluegen-rt.jar -Xbootclasspath/a:../jogl/$BUILD_SUBDIR/nativewindow/nativewindow.core.jar -Xbootclasspath/a:../jogl/$BUILD_SUBDIR/jogl/jogl.cdcfp.jar -Xbootclasspath/a:../jogl/$BUILD_SUBDIR/newt/newt.cdcfp.jar -Xbootclasspath/a:$BUILD_SUBDIR/jogl-demos.jar com.sun.javafx.newt.util.MainThread $* 2>&1 | tee cvm-dbg-newt.log
diff --git a/cvm-run-newt.sh b/cvm-run-newt.sh
new file mode 100755
index 0000000..61615da
--- /dev/null
+++ b/cvm-run-newt.sh
@@ -0,0 +1,18 @@
+#! /bin/sh
+
+CVM=$1
+shift
+
+JOGL_LIB_DIR=$1
+shift
+
+BUILD_SUBDIR=$1
+shift
+
+if [ ! -x "$CVM" -o -z "$JOGL_LIB_DIR" -o -z "$BUILD_SUBDIR" ] ; then
+ echo Usage $0 CVM-Binary JOGL_LIB_DIR BUILD_SUB_PATH
+ echo e.g. $0 ../CVM/bin/cvm ../jogl/build-cdcfp-x86/lib build-cdcfp-x86
+ exit 1
+fi
+
+$CVM -Djava.awt.headless=true -Dsun.boot.library.path=$JOGL_LIB_DIR -Xbootclasspath/a:../gluegen/$BUILD_SUBDIR/gluegen-rt.jar -Xbootclasspath/a:../jogl/$BUILD_SUBDIR/nativewindow/nativewindow.core.jar -Xbootclasspath/a:../jogl/$BUILD_SUBDIR/jogl/jogl.cdcfp.jar -Xbootclasspath/a:../jogl/$BUILD_SUBDIR/newt/newt.cdcfp.jar -Xbootclasspath/a:$BUILD_SUBDIR/jogl-demos.jar com.sun.javafx.newt.util.MainThread $* 2>&1 | tee cvm-dbg-newt.log
diff --git a/make/make.jogl.cdcfp.macosx.sh b/make/make.jogl.cdcfp.macosx.sh
new file mode 100644
index 0000000..8677f88
--- /dev/null
+++ b/make/make.jogl.cdcfp.macosx.sh
@@ -0,0 +1,10 @@
+#! /bin/sh
+
+. /devtools/etc/profile.ant
+
+# -Dc.compiler.debug=true
+
+ant -v \
+ -Djogl.es=1 \
+ -Drootrel.build=build-cdcfp-macosx \
+ $* 2>&1 | tee make.jogl.cdcfp.macosx.log
diff --git a/make/make.jogl.cdcfp.x86.sh b/make/make.jogl.cdcfp.x86.sh
new file mode 100644
index 0000000..60b7f4a
--- /dev/null
+++ b/make/make.jogl.cdcfp.x86.sh
@@ -0,0 +1,10 @@
+#! /bin/sh
+
+. ../../setenv-build-jogl-x86.sh
+
+# -Dc.compiler.debug=true
+
+ant \
+ -Djogl.es=1 \
+ -Drootrel.build=build-cdcfp-x86 \
+ $* 2>&1 | tee make.jogl.cdcfp.x86.log
diff --git a/src/demos/applets/RedSquareNEWTAWTApplet.java b/src/demos/applets/RedSquareNEWTAWTApplet.java
new file mode 100755
index 0000000..dce71ca
--- /dev/null
+++ b/src/demos/applets/RedSquareNEWTAWTApplet.java
@@ -0,0 +1,33 @@
+package demos.applets;
+
+import java.applet.*;
+import java.awt.*;
+import demos.gears.Gears;
+import javax.media.opengl.awt.GLCanvas;
+import com.sun.opengl.util.Animator;
+import com.sun.opengl.util.FPSAnimator;
+
+/** Shows how to deploy an applet using JOGL. This demo must be
+ referenced from a web page via an &lt;applet&gt; tag. */
+
+public class RedSquareNEWTAWTApplet extends Applet {
+ private Animator animator;
+
+ public void init() {
+ setLayout(new BorderLayout());
+ GLCanvas canvas = new GLCanvas();
+ canvas.addGLEventListener(new Gears());
+ canvas.setSize(getSize());
+ add(canvas, BorderLayout.CENTER);
+ animator = new FPSAnimator(canvas, 60);
+ }
+
+ public void start() {
+ animator.start();
+ }
+
+ public void stop() {
+ // FIXME: do I need to do anything else here?
+ animator.stop();
+ }
+}
diff --git a/www/applet-redsquare-newtawt-next.html b/www/applet-redsquare-newtawt-next.html
new file mode 100644
index 0000000..a05fe3e
--- /dev/null
+++ b/www/applet-redsquare-newtawt-next.html
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>JOGL JNLP Applet Test NEXT</title>
+</head>
+<body>
+
+<P>
+
+<applet code="org.jdesktop.applet.util.JNLPAppletLauncher"
+ width=600
+ height=400
+ archive="http://download.java.net/media/applet-launcher/applet-launcher.jar,
+ http://download.java.net/media/jogl/jsr-231-2.x-webstart-next/nativewindow.all.jar,
+ http://download.java.net/media/jogl/jsr-231-2.x-webstart-next/jogl.all.jar,
+ http://download.java.net/media/gluegen/webstart-2.x-next/gluegen-rt.jar,
+ http://download.java.net/media/jogl/jsr-231-2.x-demos-webstart-next/jogl-demos.jar">
+ <param name="codebase_lookup" value="false">
+ <param name="subapplet.classname" value="demos.applets.RedSquareNEWTAWTApplet">
+ <param name="subapplet.displayname" value="JOGL RedSquare NEWT-AWT Applet">
+ <param name="noddraw.check" value="true">
+ <param name="progressbar" value="true">
+ <param name="jnlpNumExtensions" value="1">
+ <param name="jnlpExtension1"
+ value="http://download.java.net/media/jogl/jsr-231-2.x-webstart-next/jogl-core.jnlp">
+ <param name="java_arguments" value="-Dsun.java2d.noddraw=true">
+ <param name="jnlp_href" value="applet-redsquare-newtawt-next.jnlp">
+</applet>
+
+</P>
+<P>
+
+</body>
+</html>
diff --git a/www/applet-redsquare-newtawt-next.jnlp b/www/applet-redsquare-newtawt-next.jnlp
new file mode 100644
index 0000000..7339ab3
--- /dev/null
+++ b/www/applet-redsquare-newtawt-next.jnlp
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp href="applet-redsquare-newtawt-next.jnlp">
+ <information>
+ <title>JOGL JNLP Applet RedSquare NEWT-AWT Demo - NEXT</title>
+ <vendor>Sun Microsystems, Inc.</vendor>
+ <homepage href="http://jogl-demos.dev.java.net/"/>
+ <description>RedSquare NEWT-AWT Demo - NEXT</description>
+ <description kind="short">RedSquare NEWT-AWT Demo - NEXT</description>
+ <offline-allowed/>
+ </information>
+
+ <resources>
+ <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/>
+ <property name="sun.java2d.noddraw" value="true"/>
+ <jar href="http://download.java.net/media/jogl/jsr-231-2.x-demos-webstart-next/jogl-demos.jar" main="true"/>
+ <jar href="http://download.java.net/media/jogl/jsr-231-2.x-demos-webstart-next/jogl-demos-util.jar"/>
+ <extension name="jogl-all-awt" href="http://download.java.net/media/jogl/jsr-231-2.x-webstart-next/jogl-all-awt.jnlp" />
+ </resources>
+
+ <applet-desc
+ name="RedSquare-NEWT-AWT-Applet"
+ main-class="demos.applets.RedSquareNEWTAWTApplet"
+ width="640"
+ height="480">
+ </applet-desc>
+</jnlp>