diff options
119 files changed, 2187 insertions, 1500 deletions
diff --git a/.classpath b/.classpath new file mode 100644 index 0000000..e48d8bf --- /dev/null +++ b/.classpath @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry excluding="redbook/|redbook/src/|jbullet/src/" kind="src" path="src"/> + <classpathentry kind="src" path="src/jbullet/src"/> + <classpathentry excluding="src/" kind="src" path="src/redbook"/> + <classpathentry kind="src" path="src/redbook/src"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Ant"/> + <classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/jogamp"/> + <classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/SWT"/> + <classpathentry kind="output" path="build"/> +</classpath> diff --git a/.externalToolBuilders/jogl-demos builder.launch b/.externalToolBuilders/jogl-demos builder.launch new file mode 100644 index 0000000..18e6f94 --- /dev/null +++ b/.externalToolBuilders/jogl-demos builder.launch @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType"> +<stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_AFTER_CLEAN_TARGETS" value="clean,"/> +<stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_MANUAL_TARGETS" value="all.ide,"/> +<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/> +<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/> +<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${project}"/> +<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/> +<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/> +<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/> +<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="jogl-demos"/> +<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/jogl-demos/make/build.xml}"/> +<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/> +<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/> +<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/jogl-demos/make}"/> +</launchConfiguration> diff --git a/.externalToolBuilders/org.eclipse.jdt.core.javabuilder (1).launch b/.externalToolBuilders/org.eclipse.jdt.core.javabuilder (1).launch new file mode 100644 index 0000000..7fe64af --- /dev/null +++ b/.externalToolBuilders/org.eclipse.jdt.core.javabuilder (1).launch @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType"> +<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="false"/> +<stringAttribute key="org.eclipse.ui.externaltools.ATTR_DISABLED_BUILDER" value="org.eclipse.jdt.core.javabuilder"/> +<mapAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS"/> +<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/> +</launchConfiguration> diff --git a/.project b/.project new file mode 100644 index 0000000..e97a844 --- /dev/null +++ b/.project @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>jogl-demos</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name> + <triggers>full,incremental,</triggers> + <arguments> + <dictionary> + <key>LaunchConfigHandle</key> + <value><project>/.externalToolBuilders/org.eclipse.jdt.core.javabuilder (1).launch</value> + </dictionary> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name> + <triggers>full,incremental,</triggers> + <arguments> + <dictionary> + <key>LaunchConfigHandle</key> + <value><project>/.externalToolBuilders/jogl-demos builder.launch</value> + </dictionary> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> diff --git a/cvm-dbg-newt.sh b/cvm-dbg-newt.sh deleted file mode 100755 index 6345002..0000000 --- a/cvm-dbg-newt.sh +++ /dev/null @@ -1,26 +0,0 @@ -#! /bin/sh - -CVM=$1 -shift - -BUILD_SUBDIR=$1 -shift - -if [ ! -x "$CVM" -o -z "$BUILD_SUBDIR" ] ; then - echo "Usage $0 CVM-Binary BUILD_SUB_PATH [-cpu <arch>] Main-Class" - echo "e.g. $0 ../CVM/bin/cvm build-x86 -cpu x86 test" - exit 1 -fi - -X_FLAGS= -if [ "$1" = "-cpu" ] ; then - shift - X_FLAGS="-Dos.arch=$1" - shift -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 $X_FLAGS -Djava.awt.headless=true $D_ARGS -Dsun.boot.library.path=../jogl/$BUILD_SUBDIR/lib -Xbootclasspath/a:../gluegen/$BUILD_SUBDIR/gluegen-rt-cdc.jar -Xbootclasspath/a:../jogl/$BUILD_SUBDIR/nativewindow/nativewindow.all.cdc.jar -Xbootclasspath/a:../jogl/$BUILD_SUBDIR/jogl/jogl.all.cdc.jar -Xbootclasspath/a:../jogl/$BUILD_SUBDIR/newt/newt.all.cdc.jar -Xbootclasspath/a:$BUILD_SUBDIR/jogl-demos.jar com.jogamp.newt.util.MainThread $* 2>&1 | tee cvm-dbg-newt.log - diff --git a/cvm-run-newt.sh b/cvm-run-newt.sh deleted file mode 100755 index 5461573..0000000 --- a/cvm-run-newt.sh +++ /dev/null @@ -1,22 +0,0 @@ -#! /bin/sh - -CVM=$1 -shift - -BUILD_SUBDIR=$1 -shift - -if [ ! -x "$CVM" -o -z "$BUILD_SUBDIR" ] ; then - echo "Usage $0 CVM-Binary BUILD_SUB_PATH [-cpu <arch>] Main-Class" - echo "e.g. $0 ../CVM/bin/cvm build-x86 -cpu x86 test" - exit 1 -fi - -X_FLAGS= -if [ "$1" = "-cpu" ] ; then - shift - X_FLAGS="-Dos.arch=$1" - shift -fi - -$CVM $X_FLAGS -Djava.awt.headless=true -Dsun.boot.library.path=../jogl/$BUILD_SUBDIR/lib -Xbootclasspath/a:../gluegen/$BUILD_SUBDIR/gluegen-rt-cdc.jar -Xbootclasspath/a:../jogl/$BUILD_SUBDIR/nativewindow/nativewindow.all.cdc.jar -Xbootclasspath/a:../jogl/$BUILD_SUBDIR/jogl/jogl.all.cdc.jar -Xbootclasspath/a:../jogl/$BUILD_SUBDIR/newt/newt.all.cdc.jar -Xbootclasspath/a:$BUILD_SUBDIR/jogl-demos.jar com.jogamp.newt.util.MainThread $* 2>&1 | tee cvm-run-newt.log diff --git a/cvm-win32-newt-dbg.bat b/cvm-win32-newt-dbg.bat deleted file mode 100755 index fdfb963..0000000 --- a/cvm-win32-newt-dbg.bat +++ /dev/null @@ -1,8 +0,0 @@ -
-set CVM_HOME=c:\cvm
-
-set JAR_DIR=jogl\lib
-set LIB_DIR=jogl\lib
-
-%CVM_HOME%\bin\cvm "-Dnativewindow.debug=all" "-Djogl.debug=all" "-Dnewt.debug=all" "-Djava.awt.headless=true" "-Dsun.boot.library.path=%LIB_DIR%" "-Xbootclasspath/a:%JAR_DIR%\gluegen-rt-cdc.jar" "-Xbootclasspath/a:%JAR_DIR%\nativewindow.all.cdc.jar" "-Xbootclasspath/a:%JAR_DIR%\jogl.all.cdc.jar" "-Xbootclasspath/a:%JAR_DIR%\newt.all.cdc.jar" "-Xbootclasspath/a:jogl-demos.jar" %1 %2 %3 %4 > cvm-win32-newt-dbg.log 2>&1
-
diff --git a/cvm-win32-newt.bat b/cvm-win32-newt.bat deleted file mode 100755 index 017c0f0..0000000 --- a/cvm-win32-newt.bat +++ /dev/null @@ -1,8 +0,0 @@ -
-set CVM_HOME=c:\cvm
-
-set JAR_DIR=jogl\lib
-set LIB_DIR=jogl\lib
-
-%CVM_HOME%\bin\cvm "-Djava.awt.headless=true" "-Dsun.boot.library.path=%LIB_DIR%" "-Xbootclasspath/a:%JAR_DIR%\gluegen-rt-cdc.jar" "-Xbootclasspath/a:%JAR_DIR%\nativewindow.all.cdc.jar" "-Xbootclasspath/a:%JAR_DIR%\jogl.all.cdc.jar" "-Xbootclasspath/a:%JAR_DIR%\newt.all.cdc.jar" "-Xbootclasspath/a:jogl-demos.jar" %1 %2 %3 %4 > cvm-win32-newt.log 2>&1
-
diff --git a/java-run-swing.sh b/java-run-swing.sh index 13995bd..7cbb97a 100644 --- a/java-run-swing.sh +++ b/java-run-swing.sh @@ -3,7 +3,8 @@ CPOK=0 echo $CLASSPATH | grep jogl && CPOK=1 -SWING_PROPS="-Dsun.java2d.noddraw=true -Dsun.java2d.opengl=false" +#SWING_PROPS="-Dsun.java2d.noddraw=true -Dsun.java2d.opengl=false" +SWING_PROPS="-Dsun.java2d.noddraw=true -Dsun.java2d.opengl=true" SWING_PROPS_DBG="-Djnlp.jogl.debug.GLJPanel=true" if [ $CPOK -eq 0 ] ; then diff --git a/java-win32-dbg.bat b/java-win32-dbg.bat index bd19b64..8b72341 100644 --- a/java-win32-dbg.bat +++ b/java-win32-dbg.bat @@ -5,7 +5,7 @@ set JAVA_HOME=c:\jdk1.6.0_22_x32 set JAR_DIR=..\jogl\build-win32\jar
set LIB_DIR=..\jogl\build-win32\lib
-set CP_ALL=.;%JAR_DIR%\jogl.all.jar;%JAR_DIR%\nativewindow.all.jar;%JAR_DIR%\newt.all.jar;%JAR_DIR%\gluegen-rt.jar;build-win32\jogl-demos.jar;build-win32\jogl-demos-util.jar;build-win32\jogl-demos-data.jar
+set CP_ALL=.;%JAR_DIR%\jogl.all.jar;%JAR_DIR%\gluegen-rt.jar;build-win32\jogl-demos.jar;build-win32\jogl-demos-util.jar;build-win32\jogl-demos-data.jar
echo CP_ALL %CP_ALL%
diff --git a/java-win32-gl2es12-dbg.bat b/java-win32-gl2es12-dbg.bat index 3baf934..ae94bf1 100644 --- a/java-win32-gl2es12-dbg.bat +++ b/java-win32-gl2es12-dbg.bat @@ -7,19 +7,11 @@ set LIB_DIR=jogl\lib set CP_GLUE=%JAR_DIR%\gluegen-rt.jar
-REM set CP_JOGL=%JAR_DIR%\jogl.core.jar;%JAR_DIR%\jogl.util.jar;%JAR_DIR%\jogl.gl2es12.win.jar;%JAR_DIR%\jogl.util.fixedfuncemu.jar;%JAR_DIR%\jogl.gl2es12.dbg.jar;%JAR_DIR%\jogl.glu.tess.jar;%JAR_DIR%\jogl.glu.mipmap.jar;%JAR_DIR%\jogl.awt.jar;%JAR_DIR%\jogl.util.awt.jar
-set CP_JOGL=%JAR_DIR%\jogl.core.jar;%JAR_DIR%\jogl.gl2es12.win.jar;%JAR_DIR%\jogl.util.jar;%JAR_DIR%\jogl.gles2.dbg.jar;%JAR_DIR%\jogl.util.fixedfuncemu.jar
-REM set CP_JOGL=%JAR_DIR%\jogl.core.jar;%JAR_DIR%\jogl.gl2.win.jar;%JAR_DIR%\jogl.util.jar;%JAR_DIR%\jogl.gles2.dbg.jar
-
-REM set CP_NEWT=%JAR_DIR%\newt.all.jar
-set CP_NEWT=%JAR_DIR%\newt.core.jar;%JAR_DIR%\newt.win.jar;%JAR_DIR%\newt.ogl.jar
-
-REM set CP_NWI=%JAR_DIR%\nativewindow.all.jar
-set CP_NWI=%JAR_DIR%\nativewindow.core.jar
+set CP_JOGL=%JAR_DIR%\jogl.all-mobile.jar;%JAR_DIR%\jogl.util.jar;%JAR_DIR%\jogl.gles2.dbg.jar;%JAR_DIR%\jogl.util.fixedfuncemu.jar
set CP_DEMO=jogl-demos.jar;jogl-demos-util.jar;jogl-demos-data.jar
-set CP_ALL=%CP_GLUE%;%CP_NWI%;%CP_JOGL%;%CP_NEWT%;%CP_DEMO%
+set CP_ALL=%CP_GLUE%;%CP_JOGL%;%CP_DEMO%
echo CP_ALL %CP_ALL%
diff --git a/java-win32.bat b/java-win32.bat index 1e92a89..1c68eb7 100644 --- a/java-win32.bat +++ b/java-win32.bat @@ -5,7 +5,7 @@ set JAVA_HOME=c:\jdk1.6.0_22_x32 set JAR_DIR=..\jogl\build-win32\jar
set LIB_DIR=..\jogl\build-win32\lib
-set CP_ALL=.;%JAR_DIR%\jogl.all.jar;%JAR_DIR%\nativewindow.all.jar;%JAR_DIR%\newt.all.jar;%JAR_DIR%\gluegen-rt.jar;build-win32\jogl-demos.jar;build-win32\jogl-demos-util.jar;build-win32\jogl-demos-data.jar
+set CP_ALL=.;%JAR_DIR%\jogl.all.jar;%JAR_DIR%\gluegen-rt.jar;build-win32\jogl-demos.jar;build-win32\jogl-demos-util.jar;build-win32\jogl-demos-data.jar
echo CP_ALL %CP_ALL%
diff --git a/java-win64-dbg.bat b/java-win64-dbg.bat index f5ef8f2..bd8b163 100644 --- a/java-win64-dbg.bat +++ b/java-win64-dbg.bat @@ -5,7 +5,7 @@ set JAVA_HOME=c:\jdk1.6.0_22_x64 set JAR_DIR=..\jogl\build-win64\jar
set LIB_DIR=..\jogl\build-win64\lib
-set CP_ALL=.;%JAR_DIR%\jogl.all.jar;%JAR_DIR%\nativewindow.all.jar;%JAR_DIR%\newt.all.jar;%JAR_DIR%\gluegen-rt.jar;build-win64\jogl-demos.jar;build-win64\jogl-demos-util.jar;build-win64\jogl-demos-data.jar
+set CP_ALL=.;%JAR_DIR%\jogl.all.jar;%JAR_DIR%\gluegen-rt.jar;build-win64\jogl-demos.jar;build-win64\jogl-demos-util.jar;build-win64\jogl-demos-data.jar
echo CP_ALL %CP_ALL%
diff --git a/java-win64.bat b/java-win64.bat index 45f1d73..d92229c 100644 --- a/java-win64.bat +++ b/java-win64.bat @@ -5,7 +5,7 @@ set JAVA_HOME=c:\jdk1.6.0_22_x64 set JAR_DIR=..\jogl\build-win64\jar
set LIB_DIR=..\jogl\build-win64\lib
-set CP_ALL=.;%JAR_DIR%\jogl.all.jar;%JAR_DIR%\nativewindow.all.jar;%JAR_DIR%\newt.all.jar;%JAR_DIR%\gluegen-rt.jar;build-win64\jogl-demos.jar;build-win64\jogl-demos-util.jar;build-win64\jogl-demos-data.jar
+set CP_ALL=.;%JAR_DIR%\jogl.all.jar;%JAR_DIR%\gluegen-rt.jar;build-win64\jogl-demos.jar;build-win64\jogl-demos-util.jar;build-win64\jogl-demos-data.jar
echo CP_ALL %CP_ALL%
diff --git a/jnlp-files/CustomText.jnlp b/jnlp-files/CustomText.jnlp index eb47a7f..c999201 100644 --- a/jnlp-files/CustomText.jnlp +++ b/jnlp-files/CustomText.jnlp @@ -14,8 +14,8 @@ <resources> <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/> <property name="sun.java2d.noddraw" value="true"/> - <jar href="jogl-demos.jar" main="true"/> - <jar href="jogl-demos-util.jar" /> + <jar href="jar/jogl-demos.jar" main="true"/> + <jar href="jar/jogl-demos-util.jar" /> <extension name="jogl-all-awt" href="JOGL_CODEBASE_TAG/jogl-all-awt.jnlp" /> </resources> diff --git a/jnlp-files/FlyingText.jnlp b/jnlp-files/FlyingText.jnlp index 74a0810..d1d0c10 100644 --- a/jnlp-files/FlyingText.jnlp +++ b/jnlp-files/FlyingText.jnlp @@ -14,8 +14,8 @@ <resources> <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/> <property name="sun.java2d.noddraw" value="true"/> - <jar href="jogl-demos.jar" main="true"/> - <jar href="jogl-demos-util.jar" /> + <jar href="jar/jogl-demos.jar" main="true"/> + <jar href="jar/jogl-demos-util.jar" /> <extension name="jogl-all-awt" href="JOGL_CODEBASE_TAG/jogl-all-awt.jnlp" /> </resources> diff --git a/jnlp-files/Gears.jnlp b/jnlp-files/Gears.jnlp index 230b3ed..a98f508 100755 --- a/jnlp-files/Gears.jnlp +++ b/jnlp-files/Gears.jnlp @@ -14,9 +14,9 @@ <resources> <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/> <property name="sun.java2d.noddraw" value="true"/> - <jar href="jogl-demos.jar" main="true"/> - <jar href="jogl-demos-util.jar" /> - <extension name="newt-all-awt" href="JOGL_CODEBASE_TAG/newt-all-awt.jnlp" /> + <jar href="jar/jogl-demos.jar" main="true"/> + <jar href="jar/jogl-demos-util.jar" /> + <extension name="jogl-all-awt" href="JOGL_CODEBASE_TAG/jogl-all-awt.jnlp" /> </resources> <application-desc main-class="demos.gears.Gears"> diff --git a/jnlp-files/HDR.jnlp b/jnlp-files/HDR.jnlp index bc2d30b..8685065 100755 --- a/jnlp-files/HDR.jnlp +++ b/jnlp-files/HDR.jnlp @@ -14,10 +14,10 @@ <resources> <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/> <property name="sun.java2d.noddraw" value="true"/> - <jar href="jogl-demos.jar" main="true"/> - <jar href="jogl-demos-util.jar" /> - <jar href="jogl-demos-data.jar" /> - <extension name="jogl-all-awt" href="JOGL_CODEBASE_TAG/jogl-all-awt.jnlp" /> + <jar href="jar/jogl-demos.jar" main="true"/> + <jar href="jar/jogl-demos-util.jar" /> + <jar href="jar/jogl-demos-data.jar" /> + <extension name="jogl-all-awt-cg" href="JOGL_CODEBASE_TAG/jogl-all-awt-cg.jnlp" /> </resources> <application-desc main-class="demos.hdr.HDR"> diff --git a/jnlp-files/HDRDebug.jnlp b/jnlp-files/HDRDebug.jnlp index 1f93b65..d49f92c 100755 --- a/jnlp-files/HDRDebug.jnlp +++ b/jnlp-files/HDRDebug.jnlp @@ -19,10 +19,10 @@ <property name="jnlp.nativewindow.TraceLock" value="true"/> <property name="jnlp.jogl.debug" value="GLDrawable"/> <property name="jnlp.newt.debug" value="all"/> - <jar href="jogl-demos.jar" main="true"/> - <jar href="jogl-demos-util.jar" /> - <jar href="jogl-demos-data.jar" /> - <extension name="jogl-all-awt" href="JOGL_CODEBASE_TAG/jogl-all-awt.jnlp" /> + <jar href="jar/jogl-demos.jar" main="true"/> + <jar href="jar/jogl-demos-util.jar" /> + <jar href="jar/jogl-demos-data.jar" /> + <extension name="jogl-all-awt-cg" href="JOGL_CODEBASE_TAG/jogl-all-awt-cg.jnlp" /> </resources> <application-desc main-class="demos.hdr.HDR"> diff --git a/jnlp-files/HWShadowmapsSimple.jnlp b/jnlp-files/HWShadowmapsSimple.jnlp index dfa7c7c..d5a9f44 100644 --- a/jnlp-files/HWShadowmapsSimple.jnlp +++ b/jnlp-files/HWShadowmapsSimple.jnlp @@ -14,9 +14,9 @@ <resources> <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/> <property name="sun.java2d.noddraw" value="true"/> - <jar href="jogl-demos.jar" main="true"/> - <jar href="jogl-demos-util.jar" /> - <jar href="jogl-demos-data.jar" /> + <jar href="jar/jogl-demos.jar" main="true"/> + <jar href="jar/jogl-demos-util.jar" /> + <jar href="jar/jogl-demos-data.jar" /> <extension name="jogl-all-awt" href="JOGL_CODEBASE_TAG/jogl-all-awt.jnlp" /> </resources> diff --git a/jnlp-files/InfiniteShadowVolumes.jnlp b/jnlp-files/InfiniteShadowVolumes.jnlp index ce833d4..6214c0e 100644 --- a/jnlp-files/InfiniteShadowVolumes.jnlp +++ b/jnlp-files/InfiniteShadowVolumes.jnlp @@ -14,9 +14,9 @@ <resources> <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/> <property name="sun.java2d.noddraw" value="true"/> - <jar href="jogl-demos.jar" main="true"/> - <jar href="jogl-demos-util.jar" /> - <jar href="jogl-demos-data.jar" /> + <jar href="jar/jogl-demos.jar" main="true"/> + <jar href="jar/jogl-demos-util.jar" /> + <jar href="jar/jogl-demos-data.jar" /> <extension name="jogl-all-awt" href="JOGL_CODEBASE_TAG/jogl-all-awt.jnlp" /> </resources> diff --git a/jnlp-files/JRefract.jnlp b/jnlp-files/JRefract.jnlp index 5cf7cd8..9895c1c 100644 --- a/jnlp-files/JRefract.jnlp +++ b/jnlp-files/JRefract.jnlp @@ -18,10 +18,10 @@ <!-- Temporary workaround for slowness in Windows NVidia drivers -->
<!-- property name="swing.bufferPerWindow" value="false"/ -->
<property name="jnlp.jogl.debug.GLJPanel" value="true"/>
- <jar href="jogl-demos.jar" main="true"/>
- <jar href="jogl-demos-util.jar" />
- <jar href="jogl-demos-data.jar" />
- <extension name="newt-all-awt" href="JOGL_CODEBASE_TAG/newt-all-awt.jnlp" />
+ <jar href="jar/jogl-demos.jar" main="true"/>
+ <jar href="jar/jogl-demos-util.jar" />
+ <jar href="jar/jogl-demos-data.jar" />
+ <extension name="jogl-all-awt" href="JOGL_CODEBASE_TAG/jogl-all-awt.jnlp" />
</resources>
<application-desc main-class="demos.jrefract.JRefract">
diff --git a/jnlp-files/JRefractNoOGL.jnlp b/jnlp-files/JRefractNoOGL.jnlp index 4dfe4c4..8ba44ec 100644 --- a/jnlp-files/JRefractNoOGL.jnlp +++ b/jnlp-files/JRefractNoOGL.jnlp @@ -14,10 +14,10 @@ <resources>
<j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/>
<property name="sun.java2d.noddraw" value="true"/>
- <jar href="jogl-demos.jar" main="true"/>
- <jar href="jogl-demos-util.jar" />
- <jar href="jogl-demos-data.jar" />
- <extension name="newt-all-awt" href="JOGL_CODEBASE_TAG/newt-all-awt.jnlp" />
+ <jar href="jar/jogl-demos.jar" main="true"/>
+ <jar href="jar/jogl-demos-util.jar" />
+ <jar href="jar/jogl-demos-data.jar" />
+ <extension name="jogl-all-awt" href="JOGL_CODEBASE_TAG/jogl-all-awt.jnlp" />
</resources>
<application-desc main-class="demos.jrefract.JRefract">
diff --git a/jnlp-files/ParticleEngine.jnlp b/jnlp-files/ParticleEngine.jnlp index 86f88bd..f21ab40 100644 --- a/jnlp-files/ParticleEngine.jnlp +++ b/jnlp-files/ParticleEngine.jnlp @@ -14,7 +14,7 @@ <resources> <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/> <property name="sun.java2d.noddraw" value="true"/> - <jar href="jogl-demos.jar" main="true"/> + <jar href="jar/jogl-demos.jar" main="true"/> <extension name="jogl-all-awt" href="JOGL_CODEBASE_TAG/jogl-all-awt.jnlp" /> </resources> diff --git a/jnlp-files/ProceduralTexturePhysics.jnlp b/jnlp-files/ProceduralTexturePhysics.jnlp index aa321f4..9e7409e 100644 --- a/jnlp-files/ProceduralTexturePhysics.jnlp +++ b/jnlp-files/ProceduralTexturePhysics.jnlp @@ -14,9 +14,9 @@ <resources> <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/> <property name="sun.java2d.noddraw" value="true"/> - <jar href="jogl-demos.jar" main="true"/> - <jar href="jogl-demos-util.jar" /> - <jar href="jogl-demos-data.jar" /> + <jar href="jar/jogl-demos.jar" main="true"/> + <jar href="jar/jogl-demos-util.jar" /> + <jar href="jar/jogl-demos-data.jar" /> <extension name="jogl-all-awt" href="JOGL_CODEBASE_TAG/jogl-all-awt.jnlp" /> </resources> diff --git a/jnlp-files/TestTextRenderer.jnlp b/jnlp-files/TestTextRenderer.jnlp index 1e8c447..c5495a8 100644 --- a/jnlp-files/TestTextRenderer.jnlp +++ b/jnlp-files/TestTextRenderer.jnlp @@ -14,9 +14,9 @@ <resources> <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/> <property name="sun.java2d.noddraw" value="true"/> - <jar href="jogl-demos.jar" main="true"/> - <jar href="jogl-demos-util.jar" /> - <extension name="newt-all-awt" href="JOGL_CODEBASE_TAG/newt-all-awt.jnlp" /> + <jar href="jar/jogl-demos.jar" main="true"/> + <jar href="jar/jogl-demos-util.jar" /> + <extension name="jogl-all-awt" href="JOGL_CODEBASE_TAG/jogl-all-awt.jnlp" /> </resources> <application-desc main-class="demos.j2d.TestTextRenderer"> diff --git a/jnlp-files/TextCube.jnlp b/jnlp-files/TextCube.jnlp index ab9ee6a..3e60843 100644 --- a/jnlp-files/TextCube.jnlp +++ b/jnlp-files/TextCube.jnlp @@ -14,8 +14,8 @@ <resources> <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/> <property name="sun.java2d.noddraw" value="true"/> - <jar href="jogl-demos.jar" main="true"/> - <jar href="jogl-demos-util.jar" /> + <jar href="jar/jogl-demos.jar" main="true"/> + <jar href="jar/jogl-demos-util.jar" /> <extension name="jogl-all-awt" href="JOGL_CODEBASE_TAG/jogl-all-awt.jnlp" /> </resources> diff --git a/jnlp-files/TextCubeDebug.jnlp b/jnlp-files/TextCubeDebug.jnlp index a50ad1a..a5a1fe6 100644 --- a/jnlp-files/TextCubeDebug.jnlp +++ b/jnlp-files/TextCubeDebug.jnlp @@ -19,8 +19,8 @@ <property name="jnlp.nativewindow.TraceLock" value="true"/> <property name="jnlp.jogl.debug" value="GLDrawable"/> <property name="jnlp.newt.debug" value="all"/> - <jar href="jogl-demos.jar" main="true"/> - <jar href="jogl-demos-util.jar" /> + <jar href="jar/jogl-demos.jar" main="true"/> + <jar href="jar/jogl-demos-util.jar" /> <extension name="jogl-all-awt" href="JOGL_CODEBASE_TAG/jogl-all-awt.jnlp" /> </resources> diff --git a/jnlp-files/TextFlow.jnlp b/jnlp-files/TextFlow.jnlp index bff834d..c7693bf 100644 --- a/jnlp-files/TextFlow.jnlp +++ b/jnlp-files/TextFlow.jnlp @@ -14,8 +14,8 @@ <resources> <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/> <property name="sun.java2d.noddraw" value="true"/> - <jar href="jogl-demos.jar" main="true"/> - <jar href="jogl-demos-util.jar" /> + <jar href="jar/jogl-demos.jar" main="true"/> + <jar href="jar/jogl-demos-util.jar" /> <extension name="jogl-all-awt" href="JOGL_CODEBASE_TAG/jogl-all-awt.jnlp" /> </resources> diff --git a/jnlp-files/VertexArrayRange.jnlp b/jnlp-files/VertexArrayRange.jnlp index eae869e..8c3e8ff 100644 --- a/jnlp-files/VertexArrayRange.jnlp +++ b/jnlp-files/VertexArrayRange.jnlp @@ -14,8 +14,8 @@ <resources> <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/> <property name="sun.java2d.noddraw" value="true"/> - <jar href="jogl-demos.jar" main="true"/> - <jar href="jogl-demos-util.jar" /> + <jar href="jar/jogl-demos.jar" main="true"/> + <jar href="jar/jogl-demos-util.jar" /> <extension name="jogl-all-awt" href="JOGL_CODEBASE_TAG/jogl-all-awt.jnlp" /> </resources> diff --git a/jnlp-files/VertexBufferObject.jnlp b/jnlp-files/VertexBufferObject.jnlp index cfa6f9c..255733d 100644 --- a/jnlp-files/VertexBufferObject.jnlp +++ b/jnlp-files/VertexBufferObject.jnlp @@ -14,8 +14,8 @@ <resources> <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/> <property name="sun.java2d.noddraw" value="true"/> - <jar href="jogl-demos.jar" main="true"/> - <jar href="jogl-demos-util.jar" /> + <jar href="jar/jogl-demos.jar" main="true"/> + <jar href="jar/jogl-demos-util.jar" /> <extension name="jogl-all-awt" href="JOGL_CODEBASE_TAG/jogl-all-awt.jnlp" /> </resources> diff --git a/jnlp-files/VertexProgRefract.jnlp b/jnlp-files/VertexProgRefract.jnlp index 3d50e30..9cbeafa 100644 --- a/jnlp-files/VertexProgRefract.jnlp +++ b/jnlp-files/VertexProgRefract.jnlp @@ -14,9 +14,9 @@ <resources> <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/> <property name="sun.java2d.noddraw" value="true"/> - <jar href="jogl-demos.jar" main="true"/> - <jar href="jogl-demos-util.jar" /> - <jar href="jogl-demos-data.jar" /> + <jar href="jar/jogl-demos.jar" main="true"/> + <jar href="jar/jogl-demos-util.jar" /> + <jar href="jar/jogl-demos-data.jar" /> <extension name="jogl-all-awt" href="JOGL_CODEBASE_TAG/jogl-all-awt.jnlp" /> </resources> diff --git a/jnlp-files/VertexProgWarp.jnlp b/jnlp-files/VertexProgWarp.jnlp index 733c0a9..be9c720 100644 --- a/jnlp-files/VertexProgWarp.jnlp +++ b/jnlp-files/VertexProgWarp.jnlp @@ -14,9 +14,9 @@ <resources> <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/> <property name="sun.java2d.noddraw" value="true"/> - <jar href="jogl-demos.jar" main="true"/> - <jar href="jogl-demos-util.jar" /> - <jar href="jogl-demos-data.jar" /> + <jar href="jar/jogl-demos.jar" main="true"/> + <jar href="jar/jogl-demos-util.jar" /> + <jar href="jar/jogl-demos-data.jar" /> <extension name="jogl-all-awt" href="JOGL_CODEBASE_TAG/jogl-all-awt.jnlp" /> </resources> diff --git a/jnlp-files/XTrans.jnlp b/jnlp-files/XTrans.jnlp index ae351e8..a914830 100644 --- a/jnlp-files/XTrans.jnlp +++ b/jnlp-files/XTrans.jnlp @@ -17,9 +17,9 @@ <property name="sun.java2d.opengl" value="True"/>
<!-- Temporary workaround for slowness in Windows NVidia drivers -->
<!-- property name="swing.bufferPerWindow" value="false"/ -->
- <jar href="jogl-demos.jar" main="true"/>
- <jar href="jogl-demos-util.jar" />
- <jar href="jogl-demos-data.jar" />
+ <jar href="jar/jogl-demos.jar" main="true"/>
+ <jar href="jar/jogl-demos-util.jar" />
+ <jar href="jar/jogl-demos-data.jar" />
<extension name="jogl-all-awt" href="JOGL_CODEBASE_TAG/jogl-all-awt.jnlp" />
</resources>
diff --git a/jnlp-files/applet-gears-jnlp.html b/jnlp-files/applet-gears-jnlp.html deleted file mode 100644 index 64a16d9..0000000 --- a/jnlp-files/applet-gears-jnlp.html +++ /dev/null @@ -1,19 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html> -<head> -<title>JOGL JNLP Applet Gears</title> -</head> -<body> - -<P> - -<applet width=600 height=400> - <param name="java_arguments" value="-Dsun.java2d.noddraw=true"> - <param name="jnlp_href" value="applet-gears.jnlp"> -</applet> - -</P> -<P> - -</body> -</html> diff --git a/jnlp-files/applet-gears-launcheronly.html b/jnlp-files/applet-gears-launcheronly.html new file mode 100644 index 0000000..6193df3 --- /dev/null +++ b/jnlp-files/applet-gears-launcheronly.html @@ -0,0 +1,128 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<html> +<head> +<title>JOGL Applet Test</title> +</head> +<body> + +<P> + +The new <a +href="http://jogamp.org/applet-launcher/www/">JNLPAppletLauncher</a> +enables the creation and deployment of applets using 3D graphics via +OpenGL without requiring the applet to be signed or performing any +manual installation of software on users' computers. It has been +tested and should work on any OS/CPU combination supported by JOGL +with a Java Runtime Environment version 1.4.2 or later installed into +the web browser. Here is an example of the standard Gears demo running +as an applet: + +</P> +<P> + +<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" + width="600" height="400"> + <param name="code" value="org.jdesktop.applet.util.JNLPAppletLauncher"> + <param name="archive" value="../jar/applet-launcher.jar, + ../jar/gluegen-rt.jar, + ../jar/jogl.all.jar, + jar/jogl-demos.jar"> + <param name="codebase_lookup" value="false"> + <param name="subapplet.classname" value="demos.applets.GearsApplet"> + <param name="subapplet.displayname" value="JOGL Gears Applet"> + <param name="noddraw.check" value="true"> + <param name="progressbar" value="true"> + <param name="jnlpNumExtensions" value="1"> + <param name="jnlpExtension1" + value="../jogl-all-awt.jnlp"> + <param name="java_arguments" value="-Dsun.java2d.noddraw=true"> + <comment> + <embed code="org.jdesktop.applet.util.JNLPAppletLauncher" + width="600" height="400" + type="application/x-java-applet;version=1.6" + pluginspage="http://java.sun.com/javase/downloads/ea.jsp" + archive="../jar/applet-launcher.jar, + ../jar/gluegen-rt.jar, + ../jar/jogl.all.jar, + jar/jogl-demos.jar" + codebase_lookup="false" + subapplet.classname="demos.applets.GearsApplet" + subapplet.displayname" value="JOGL Gears Applet" + noddraw.check" value="true" + progressbar="true" + jnlpNumExtensions="1" + jnlpExtension1="../jogl-all-awt.jnlp" + java_arguments="-Dsun.java2d.noddraw=true"> + <noembed>Sorry, no Java support detected.</noembed> + </embed> + </comment> +</object> + + +</P> +<P> + +The applet above is instantiated with the following code: + +<pre> +<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" + width="600" height="400"> + <param name="code" value="org.jdesktop.applet.util.JNLPAppletLauncher"> + <param name="archive" value="../jar/applet-launcher.jar, + ../jar/gluegen-rt.jar, + ../jar/jogl.all.jar, + jar/jogl-demos.jar"> + <param name="codebase_lookup" value="false"> + <param name="subapplet.classname" value="demos.applets.GearsApplet"> + <param name="subapplet.displayname" value="JOGL Gears Applet"> + <param name="noddraw.check" value="true"> + <param name="progressbar" value="true"> + <param name="jnlpNumExtensions" value="1"> + <param name="jnlpExtension1" + value="../jogl-all-awt.jnlp"> + <param name="java_arguments" value="-Dsun.java2d.noddraw=true"> + <comment> + <embed code="org.jdesktop.applet.util.JNLPAppletLauncher" + width="600" height="400" + type="application/x-java-applet;version=1.6" + pluginspage="http://java.sun.com/javase/downloads/ea.jsp" + archive="../jar/applet-launcher.jar, + ../jar/gluegen-rt.jar, + ../jar/jogl.all.jar, + jar/jogl-demos.jar" + codebase_lookup="false" + subapplet.classname="demos.applets.GearsApplet" + subapplet.displayname" value="JOGL Gears Applet" + noddraw.check" value="true" + progressbar="true" + jnlpNumExtensions="1" + jnlpExtension1="../jogl-all-awt.jnlp" + java_arguments="-Dsun.java2d.noddraw=true"> + <noembed>Sorry, no Java support detected.</noembed> + </embed> + </comment> +</object> +</pre> + +</P> +<P> + +Note that the jogl-demos.jar, which contains the GearsApplet class, +<B>does not need to be signed</B>! JogAmp Community signs +applet-launcher.jar, jogl.jar and gluegen-rt.jar, which contain the +JNLPAppletLauncher and JOGL's supporting classes; this is the only +Java code which needs to be signed in order to deploy applets using +JOGL and is the only certificate the end user must accept. + +</P> +<P> + +The <a href="http://jogamp.org/applet-launcher/www/">JNLPAppletLauncher +home page</a> contains more information about what files must be +placed on the web server in order to enable the deployment of applets +using JOGL and other extensions. + +</P> + +</body> +</html> diff --git a/www/applettest-jnlp.html b/jnlp-files/applet-gears.html index 2fc7013..8fe78eb 100644 --- a/www/applettest-jnlp.html +++ b/jnlp-files/applet-gears.html @@ -21,26 +21,45 @@ JNLP applet's one. <P> -<applet code="org.jdesktop.applet.util.JNLPAppletLauncher" - width=600 - height=400 - archive="http://jogamp.org/deployment/util/applet-launcher.jar, - http://jogamp.org/deployment/webstart/newt.all.jar, - http://jogamp.org/deployment/webstart/nativewindow.all.jar, - http://jogamp.org/deployment/webstart/jogl.all.jar, - http://jogamp.org/deployment/webstart/gluegen-rt.jar, - http://jogamp.org/deployment/webstart/jogl-demos/jogl-demos.jar"> +<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" + width="600" height="400"> + <param name="code" value="org.jdesktop.applet.util.JNLPAppletLauncher"> + <param name="archive" value="../jar/applet-launcher.jar, + ../jar/gluegen-rt.jar, + ../jar/jogl.all.jar, + jar/jogl-demos.jar"> <param name="codebase_lookup" value="false"> <param name="subapplet.classname" value="demos.applets.GearsApplet"> <param name="subapplet.displayname" value="JOGL Gears Applet"> <param name="noddraw.check" value="true"> <param name="progressbar" value="true"> <param name="jnlpNumExtensions" value="1"> - <param name="jnlpExtension1" - value="http://jogamp.org/deployment/webstart/jogl-core.jnlp"> + <param name="jnlpExtension1" value="../jogl-all-awt.jnlp"> <param name="java_arguments" value="-Dsun.java2d.noddraw=true"> <param name="jnlp_href" value="applet-gears.jnlp"> -</applet> + <comment> + <embed code="org.jdesktop.applet.util.JNLPAppletLauncher" + width="600" height="400" + type="application/x-java-applet;version=1.6" + pluginspage="http://java.sun.com/javase/downloads/ea.jsp" + archive="../jar/applet-launcher.jar, + ../jar/gluegen-rt.jar, + ../jar/jogl.all.jar, + jar/jogl-demos.jar" + codebase_lookup="false" + subapplet.classname="demos.applets.GearsApplet" + subapplet.displayname" value="JOGL Gears Applet" + noddraw.check" value="true" + progressbar="true" + jnlpNumExtensions="1" + jnlpExtension1="../jogl-all-awt.jnlp" + java_arguments="-Dsun.java2d.noddraw=true" + jnlp_href="applet-gears.jnlp"> + <noembed>Sorry, no Java support detected.</noembed> + </embed> + </comment> +</object> + </P> <P> @@ -48,25 +67,44 @@ JNLP applet's one. The applet above is instantiated with the following code: <pre> -<applet code="org.jdesktop.applet.util.JNLPAppletLauncher" - width=600 - height=400 - archive="http://jogamp.org/deployment/util/applet-launcher.jar, - http://jogamp.org/deployment/webstart/nativewindow.all.jar, - http://jogamp.org/deployment/webstart/jogl.all.jar, - http://jogamp.org/deployment/webstart/gluegen-rt.jar, - http://jogamp.org/deployment/webstart/jogl-demos/jogl-demos.jar"> +<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" + width="600" height="400"> + <param name="code" value="org.jdesktop.applet.util.JNLPAppletLauncher"> + <param name="archive" value="../jar/applet-launcher.jar, + ../jar/gluegen-rt.jar, + ../jar/jogl.all.jar, + jar/jogl-demos.jar"> <param name="codebase_lookup" value="false"> <param name="subapplet.classname" value="demos.applets.GearsApplet"> <param name="subapplet.displayname" value="JOGL Gears Applet"> <param name="noddraw.check" value="true"> <param name="progressbar" value="true"> <param name="jnlpNumExtensions" value="1"> - <param name="jnlpExtension1" - value="http://jogamp.org/deployment/webstart/jogl-core.jnlp"> + <param name="jnlpExtension1" value="../jogl-all-awt.jnlp"> <param name="java_arguments" value="-Dsun.java2d.noddraw=true"> <param name="jnlp_href" value="applet-gears.jnlp"> -</applet> + <comment> + <embed code="org.jdesktop.applet.util.JNLPAppletLauncher" + width="600" height="400" + type="application/x-java-applet;version=1.6" + pluginspage="http://java.sun.com/javase/downloads/ea.jsp" + archive="../jar/applet-launcher.jar, + ../jar/gluegen-rt.jar, + ../jar/jogl.all.jar, + jar/jogl-demos.jar" + codebase_lookup="false" + subapplet.classname="demos.applets.GearsApplet" + subapplet.displayname" value="JOGL Gears Applet" + noddraw.check" value="true" + progressbar="true" + jnlpNumExtensions="1" + jnlpExtension1="../jogl-all-awt.jnlp" + java_arguments="-Dsun.java2d.noddraw=true" + jnlp_href="applet-gears.jnlp"> + <noembed>Sorry, no Java support detected.</noembed> + </embed> + </comment> +</object> </pre> Where the referenced JNLP file <em>applet-gears.jnlp</em> looks as follow: @@ -86,9 +124,9 @@ Where the referenced JNLP file <em>applet-gears.jnlp</em> looks as follow: <resources> <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/> <property name="sun.java2d.noddraw" value="true"/> - <jar href="http://jogamp.org/deployment/webstart/jogl-demos/jogl-demos.jar" main="true"/> - <jar href="http://jogamp.org/deployment/webstart/jogl-demos/jogl-demos-util.jar"/> - <extension name="newt-all-awt" href="http://jogamp.org/deployment/webstart/newt-all-awt.jnlp" /> + <jar href="http://jogamp.org/deployment/jogamp-current/jogl-demos/jar/jogl-demos.jar" main="true"/> + <jar href="http://jogamp.org/deployment/jogamp-current/jogl-demos/jar/jogl-demos-util.jar"/> + <extension name="newt-all-awt" href="http://jogamp.org/deployment/jogamp-current/jogl-all-awt.jnlp" /> </resources> <applet-desc diff --git a/jnlp-files/applet-gears.jnlp b/jnlp-files/applet-gears.jnlp index 833d334..bb8246d 100644 --- a/jnlp-files/applet-gears.jnlp +++ b/jnlp-files/applet-gears.jnlp @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<jnlp codebase="DEMO_CODEBASE_TAG" href="applet-gears.jnlp"> +<jnlp href="applet-gears.jnlp"> <information> <title>JOGL JNLP Applet Gears Demo</title> <vendor>JogAmp Community</vendor> @@ -13,9 +13,9 @@ <resources> <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/> <property name="sun.java2d.noddraw" value="true"/> - <jar href="jogl-demos.jar" main="true"/> - <jar href="jogl-demos-util.jar"/> - <extension name="newt-all-awt" href="JOGL_CODEBASE_TAG/newt-all-awt.jnlp" /> + <jar href="jar/jogl-demos.jar" main="true"/> + <jar href="jar/jogl-demos-util.jar"/> + <extension name="jogl-all-awt" href="../jogl-all-awt.jnlp" /> </resources> <applet-desc diff --git a/jnlp-files/applet-gearsjoal-jnlp.html b/jnlp-files/applet-gearsjoal-jnlp.html deleted file mode 100644 index 01e8117..0000000 --- a/jnlp-files/applet-gearsjoal-jnlp.html +++ /dev/null @@ -1,19 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html> -<head> -<title>JOGL JNLP Applet GearsJOAL</title> -</head> -<body> - -<P> - -<applet width=600 height=400> - <param name="java_arguments" value="-Dsun.java2d.noddraw=true"> - <param name="jnlp_href" value="applet-gearsjoal.jnlp"> -</applet> - -</P> -<P> - -</body> -</html> diff --git a/jnlp-files/applet-gearsjoal-launcheronly.html b/jnlp-files/applet-gearsjoal-launcheronly.html new file mode 100644 index 0000000..8706e08 --- /dev/null +++ b/jnlp-files/applet-gearsjoal-launcheronly.html @@ -0,0 +1,140 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<html> +<head> +<title>JOGL / JOAL Applet Test</title> +</head> +<body> + +<P> + +The new <a +href="http://jogamp.org/applet-launcher/www/">JNLPAppletLauncher</a> +supports deployment of high-end applets using arbitrary extensions +such as JOGL for 3D graphics and JOAL for spatialized audio. The +user's applet does not have to be signed, and no manual installation +of software on the user's machine is necessary. Combined JOGL and JOAL +applets are supported by the JNLPAppletLauncher on all OS and CPU +combinations where these libraries are supported: currently +Windows/x86, Linux/x86, and Mac OS X, both PowerPC and Intel. + +</P> +<P> + +Here is a simple example of an applet which combines both OpenGL +rendering and OpenAL audio: + +</P> +<P> + +<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" + width="600" height="400"> + <param name="code" value="org.jdesktop.applet.util.JNLPAppletLauncher"> + <param name="archive" value="../jar/applet-launcher.jar, + ../jar/gluegen-rt.jar, + ../jar/jogl.all.jar, + ../jar/joal.jar, + jar/jogl-demos.jar"> + <param name="codebase_lookup" value="false"> + <param name="subapplet.classname" value="demos.applets.GearsJOALApplet"> + <param name="subapplet.displayname" value="JOGL / JOAL Gears Applet"> + <param name="noddraw.check" value="true"> + <param name="progressbar" value="true"> + <param name="jnlpNumExtensions" value="2"> + <param name="jnlpExtension1" value="../jogl-all-awt.jnlp"> + <param name="jnlpExtension2" value="../joal.jnlp"> + <param name="java_arguments" value="-Dsun.java2d.noddraw=true"> + <comment> + <embed code="org.jdesktop.applet.util.JNLPAppletLauncher" + width="600" height="400" + type="application/x-java-applet;version=1.6" + pluginspage="http://java.sun.com/javase/downloads/ea.jsp" + archive="../jar/applet-launcher.jar, + ../jar/gluegen-rt.jar, + ../jar/jogl.all.jar, + ../jar/joal.jar, + jar/jogl-demos.jar" + codebase_lookup="false" + subapplet.classname="demos.applets.GearsJOALApplet" + subapplet.displayname" value="JOGL / JOAL Gears Applet" + noddraw.check" value="true" + progressbar="true" + jnlpNumExtensions="2" + jnlpExtension1="../jogl-all-awt.jnlp" + jnlpExtension2="../joal.jnlp" + java_arguments="-Dsun.java2d.noddraw=true"> + <noembed>Sorry, no Java support detected.</noembed> + </embed> + </comment> +</object> + +</P> +<P> + +The applet above is instantiated with the following code: + +<pre> +<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" + width="600" height="400"> + <param name="code" value="org.jdesktop.applet.util.JNLPAppletLauncher"> + <param name="archive" value="../jar/applet-launcher.jar, + ../jar/gluegen-rt.jar, + ../jar/jogl.all.jar, + ../jar/joal.jar, + jar/jogl-demos.jar"> + <param name="codebase_lookup" value="false"> + <param name="subapplet.classname" value="demos.applets.GearsJOALApplet"> + <param name="subapplet.displayname" value="JOGL / JOAL Gears Applet"> + <param name="noddraw.check" value="true"> + <param name="progressbar" value="true"> + <param name="jnlpNumExtensions" value="2"> + <param name="jnlpExtension1" value="../jogl-all-awt.jnlp"> + <param name="jnlpExtension2" value="../joal.jnlp"> + <param name="java_arguments" value="-Dsun.java2d.noddraw=true"> + <comment> + <embed code="org.jdesktop.applet.util.JNLPAppletLauncher" + width="600" height="400" + type="application/x-java-applet;version=1.6" + pluginspage="http://java.sun.com/javase/downloads/ea.jsp" + archive="../jar/applet-launcher.jar, + ../jar/gluegen-rt.jar, + ../jar/jogl.all.jar, + ../jar/joal.jar, + jar/jogl-demos.jar" + codebase_lookup="false" + subapplet.classname="demos.applets.GearsJOALApplet" + subapplet.displayname" value="JOGL / JOAL Gears Applet" + noddraw.check" value="true" + progressbar="true" + jnlpNumExtensions="2" + jnlpExtension1="../jogl-all-awt.jnlp" + jnlpExtension2="../joal.jnlp" + java_arguments="-Dsun.java2d.noddraw=true"> + <noembed>Sorry, no Java support detected.</noembed> + </embed> + </comment> +</object> +</pre> + +</P> +<P> + +Note that the jogl-demos.jar and joal-demos.jar files, which contain +the applet's classes, <B>do not need to be signed</B>! JogAmp Community +signs applet-launcher.jar, jogl.jar, joal.jar and +gluegen-rt.jar, which contain the JNLPAppletLauncher, JOGL, JOAL and +supporting classes; this is the only Java code which needs to be +signed in order to deploy applets using JOGL and JOAL and is the only +certificate the end user must accept. + +</P> +<P> + +The <a href="http://jogamp.org/applet-launcher/www/">JNLPAppletLauncher +home page</a> contains more information about what files must be +placed on the web server in order to enable the deployment of applets +using JOGL and other extensions. + +</P> + +</body> +</html> diff --git a/jnlp-files/applet-gearsjoal.html b/jnlp-files/applet-gearsjoal.html new file mode 100644 index 0000000..e96aa61 --- /dev/null +++ b/jnlp-files/applet-gearsjoal.html @@ -0,0 +1,126 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<html> +<head> +<title>JOGL JNLP Applet GearsJOAL</title> +</head> +<body> + +<P> + +<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" + width="600" height="400"> + <param name="code" value="org.jdesktop.applet.util.JNLPAppletLauncher"> + <param name="archive" value="../jar/applet-launcher.jar, + ../jar/gluegen-rt.jar, + ../jar/jogl.all.jar, + ../jar/joal.jar, + jar/jogl-demos.jar"> + <param name="codebase_lookup" value="false"> + <param name="subapplet.classname" value="demos.applets.GearsJOALApplet"> + <param name="subapplet.displayname" value="JOGL / JOAL Gears Applet"> + <param name="noddraw.check" value="true"> + <param name="progressbar" value="true"> + <param name="jnlpNumExtensions" value="2"> + <param name="jnlpExtension1" value="../jogl-all-awt.jnlp"> + <param name="jnlpExtension2" value="../joal.jnlp"> + <param name="java_arguments" value="-Dsun.java2d.noddraw=true"> + <param name="jnlp_href" value="applet-gearsjoal.jnlp"> + <comment> + <embed code="org.jdesktop.applet.util.JNLPAppletLauncher" + width="600" height="400" + type="application/x-java-applet;version=1.6" + pluginspage="http://java.sun.com/javase/downloads/ea.jsp" + archive="../jar/applet-launcher.jar, + ../jar/gluegen-rt.jar, + ../jar/jogl.all.jar, + ../jar/joal.jar, + jar/jogl-demos.jar" + codebase_lookup="false" + subapplet.classname="demos.applets.GearsJOALApplet" + subapplet.displayname" value="JOGL / JOAL Gears Applet" + noddraw.check" value="true" + progressbar="true" + jnlpNumExtensions="2" + jnlpExtension1="../jogl-all-awt.jnlp" + jnlpExtension2="../joal.jnlp" + java_arguments="-Dsun.java2d.noddraw=true" + jnlp_href="applet-gearsjoal.jnlp"> + <noembed>Sorry, no Java support detected.</noembed> + </embed> + </comment> +</object> + +</P> +<P> + +The applet above is instantiated with the following code: + +<pre> +<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" + width="600" height="400"> + <param name="code" value="org.jdesktop.applet.util.JNLPAppletLauncher"> + <param name="archive" value="../jar/applet-launcher.jar, + ../jar/gluegen-rt.jar, + ../jar/jogl.all.jar, + ../jar/joal.jar, + jar/jogl-demos.jar"> + <param name="codebase_lookup" value="false"> + <param name="subapplet.classname" value="demos.applets.GearsJOALApplet"> + <param name="subapplet.displayname" value="JOGL / JOAL Gears Applet"> + <param name="noddraw.check" value="true"> + <param name="progressbar" value="true"> + <param name="jnlpNumExtensions" value="2"> + <param name="jnlpExtension1" value="../jogl-all-awt.jnlp"> + <param name="jnlpExtension2" value="../joal.jnlp"> + <param name="java_arguments" value="-Dsun.java2d.noddraw=true"> + <param name="jnlp_href" value="applet-gearsjoal.jnlp"> + <comment> + <embed code="org.jdesktop.applet.util.JNLPAppletLauncher" + width="600" height="400" + type="application/x-java-applet;version=1.6" + pluginspage="http://java.sun.com/javase/downloads/ea.jsp" + archive="../jar/applet-launcher.jar, + ../jar/gluegen-rt.jar, + ../jar/jogl.all.jar, + ../jar/joal.jar, + jar/jogl-demos.jar" + codebase_lookup="false" + subapplet.classname="demos.applets.GearsJOALApplet" + subapplet.displayname" value="JOGL / JOAL Gears Applet" + noddraw.check" value="true" + progressbar="true" + jnlpNumExtensions="2" + jnlpExtension1="../jogl-all-awt.jnlp" + jnlpExtension2="../joal.jnlp" + java_arguments="-Dsun.java2d.noddraw=true" + jnlp_href="applet-gearsjoal.jnlp"> + <noembed>Sorry, no Java support detected.</noembed> + </embed> + </comment> +</object> +</pre> + +</P> +<P> + +Note that the jogl-demos.jar and joal-demos.jar files, which contain +the applet's classes, <B>do not need to be signed</B>! JogAmp Community +signs applet-launcher.jar, jogl.jar, joal.jar and +gluegen-rt.jar, which contain the JNLPAppletLauncher, JOGL, JOAL and +supporting classes; this is the only Java code which needs to be +signed in order to deploy applets using JOGL and JOAL and is the only +certificate the end user must accept. + +</P> +<P> + +The <a href="http://jogamp.org/applet-launcher/www/">JNLPAppletLauncher +home page</a> contains more information about what files must be +placed on the web server in order to enable the deployment of applets +using JOGL and other extensions. + +</P> + + +</body> +</html> diff --git a/jnlp-files/applet-gearsjoal.jnlp b/jnlp-files/applet-gearsjoal.jnlp index dfa8ff4..c097256 100644 --- a/jnlp-files/applet-gearsjoal.jnlp +++ b/jnlp-files/applet-gearsjoal.jnlp @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<jnlp codebase="DEMO_CODEBASE_TAG" href="applet-gearsjoal.jnlp"> +<jnlp href="applet-gearsjoal.jnlp"> <information> <title>JOGL JNLP Applet GearsJOAL Demo</title> <vendor>JogAmp Community</vendor> @@ -13,11 +13,11 @@ <resources> <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/> <property name="sun.java2d.noddraw" value="true"/> - <jar href="jogl-demos.jar" main="true"/> - <jar href="jogl-demos-data.jar"/> - <jar href="jogl-demos-util.jar"/> - <extension name="newt-all-awt" href="JOGL_CODEBASE_TAG/newt-all-awt.jnlp" /> - <extension name="joal" href="JOAL_CODEBASE_TAG/joal.jnlp" /> + <jar href="jar/jogl-demos.jar" main="true"/> + <jar href="jar/jogl-demos-data.jar"/> + <jar href="jar/jogl-demos-util.jar"/> + <extension name="jogl-all-awt" href="../jogl-all-awt.jnlp" /> + <extension name="joal" href="../joal.jnlp" /> </resources> <applet-desc diff --git a/jnlp-files/jogl-newt-applet-runner-angelesgl2es1.html b/jnlp-files/jogl-newt-applet-runner-angelesgl2es1.html index d404db0..c50aaf0 100644 --- a/jnlp-files/jogl-newt-applet-runner-angelesgl2es1.html +++ b/jnlp-files/jogl-newt-applet-runner-angelesgl2es1.html @@ -7,15 +7,39 @@ <P> -<applet width=600 height=400> +<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" + width="600" height="400"> + <param name="code" value="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run"> + <param name="archive" value="../jar/gluegen-rt.jar, + ../jar/jogl.all.jar, + jar/jogl-demos.jar, + jar/jogl-demos-util.jar"> <param name="java_arguments" value="-Dsun.java2d.noddraw=true"> <param name="gl_event_listener_class" value="demos.es1.angeles.AngelesGL"> <param name="gl_profile" value="GL2ES1"> <param name="gl_swap_interval" value="1"> <param name="gl_debug" value="false"> <param name="gl_trace" value="false"> - <param name="jnlp_href" value="jogl-newt-applet-runner.jnlp"> -</applet> + <comment> + <embed code="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run" + width="600" height="400" + type="application/x-java-applet;version=1.6" + pluginspage="http://java.sun.com/javase/downloads/ea.jsp" + archive="../jar/gluegen-rt.jar, + ../jar/jogl.all.jar, + jar/jogl-demos.jar, + jar/jogl-demos-util.jar" + java_arguments="-Dsun.java2d.noddraw=true" + gl_event_listener_class="demos.es1.angeles.AngelesGL" + gl_profile="GL2ES1" + gl_swap_interval="1" + gl_debug="false" + gl_trace="false"> + <noembed>Sorry, no Java support detected.</noembed> + </embed> + </comment> +</object> + </P> <P> diff --git a/jnlp-files/jogl-newt-applet-runner-cube.html b/jnlp-files/jogl-newt-applet-runner-cube.html index bed8526..f04dfcf 100644 --- a/jnlp-files/jogl-newt-applet-runner-cube.html +++ b/jnlp-files/jogl-newt-applet-runner-cube.html @@ -7,15 +7,39 @@ <P> -<applet width=600 height=400> +<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" + width="600" height="400"> + <param name="code" value="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run"> + <param name="archive" value="../jar/gluegen-rt.jar, + ../jar/jogl.all.jar, + jar/jogl-demos.jar, + jar/jogl-demos-util.jar"> <param name="java_arguments" value="-Dsun.java2d.noddraw=true"> <param name="gl_event_listener_class" value="demos.es1.cube.Cube"> <param name="gl_profile" value="GL2ES1"> <param name="gl_swap_interval" value="1"> <param name="gl_debug" value="false"> <param name="gl_trace" value="false"> - <param name="jnlp_href" value="jogl-newt-applet-runner.jnlp"> -</applet> + <comment> + <embed code="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run" + width="600" height="400" + type="application/x-java-applet;version=1.6" + pluginspage="http://java.sun.com/javase/downloads/ea.jsp" + archive="../jar/gluegen-rt.jar, + ../jar/jogl.all.jar, + jar/jogl-demos.jar, + jar/jogl-demos-util.jar" + java_arguments="-Dsun.java2d.noddraw=true" + gl_event_listener_class="demos.es1.cube.Cube" + gl_profile="GL2ES1" + gl_swap_interval="1" + gl_debug="false" + gl_trace="false"> + <noembed>Sorry, no Java support detected.</noembed> + </embed> + </comment> +</object> + </P> <P> diff --git a/jnlp-files/jogl-newt-applet-runner-fbcubes.html b/jnlp-files/jogl-newt-applet-runner-fbcubes.html index bae59a4..ef3446e 100644 --- a/jnlp-files/jogl-newt-applet-runner-fbcubes.html +++ b/jnlp-files/jogl-newt-applet-runner-fbcubes.html @@ -7,15 +7,39 @@ <P> -<applet width=600 height=400> +<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" + width="600" height="400"> + <param name="code" value="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run"> + <param name="archive" value="../jar/gluegen-rt.jar, + ../jar/jogl.all.jar, + jar/jogl-demos.jar, + jar/jogl-demos-util.jar"> <param name="java_arguments" value="-Dsun.java2d.noddraw=true"> <param name="gl_event_listener_class" value="demos.es1.cubefbo.FBCubes"> <param name="gl_profile" value="GL2ES1"> <param name="gl_swap_interval" value="1"> <param name="gl_debug" value="false"> <param name="gl_trace" value="false"> - <param name="jnlp_href" value="jogl-newt-applet-runner.jnlp"> -</applet> + <comment> + <embed code="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run" + width="600" height="400" + type="application/x-java-applet;version=1.6" + pluginspage="http://java.sun.com/javase/downloads/ea.jsp" + archive="../jar/gluegen-rt.jar, + ../jar/jogl.all.jar, + jar/jogl-demos.jar, + jar/jogl-demos-util.jar" + java_arguments="-Dsun.java2d.noddraw=true" + gl_event_listener_class="demos.es1.cubefbo.FBCubes" + gl_profile="GL2ES1" + gl_swap_interval="1" + gl_debug="false" + gl_trace="false"> + <noembed>Sorry, no Java support detected.</noembed> + </embed> + </comment> +</object> + </P> <P> diff --git a/jnlp-files/jogl-newt-applet-runner-gears.html b/jnlp-files/jogl-newt-applet-runner-gears.html index 6da92ea..bb57e32 100644 --- a/jnlp-files/jogl-newt-applet-runner-gears.html +++ b/jnlp-files/jogl-newt-applet-runner-gears.html @@ -3,19 +3,43 @@ <head> <title>JOGL NEWT JNLP Applet Runner - Gears</title> </head> -<body> +<body BGCOLOR="#ffffff"> <P> -<applet width=600 height=400> +<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" + width="600" height="400"> + <param name="code" value="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run"> + <param name="archive" value="../jar/gluegen-rt.jar, + ../jar/jogl.all.jar, + jar/jogl-demos.jar, + jar/jogl-demos-util.jar"> <param name="java_arguments" value="-Dsun.java2d.noddraw=true"> <param name="gl_event_listener_class" value="demos.gears.Gears"> <param name="gl_profile" value="GL2"> <param name="gl_swap_interval" value="1"> <param name="gl_debug" value="false"> <param name="gl_trace" value="false"> - <param name="jnlp_href" value="jogl-newt-applet-runner.jnlp"> -</applet> + <comment> + <embed code="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run" + width="600" height="400" + type="application/x-java-applet;version=1.6" + pluginspage="http://java.sun.com/javase/downloads/ea.jsp" + archive="../jar/gluegen-rt.jar, + ../jar/jogl.all.jar, + jar/jogl-demos.jar, + jar/jogl-demos-util.jar" + java_arguments="-Dsun.java2d.noddraw=true" + gl_event_listener_class="demos.gears.Gears" + gl_profile="GL2" + gl_swap_interval="1" + gl_debug="false" + gl_trace="false"> + <noembed>Sorry, no Java support detected.</noembed> + </embed> + </comment> +</object> + </P> <P> diff --git a/jnlp-files/jogl-newt-applet-runner.jnlp b/jnlp-files/jogl-newt-applet-runner.jnlp deleted file mode 100644 index 53a4fe0..0000000 --- a/jnlp-files/jogl-newt-applet-runner.jnlp +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<jnlp codebase="DEMO_CODEBASE_TAG" href="jogl-newt-applet-runner.jnlp"> - <information> - <title>JOGL NEWT JNLP Applet Runner</title> - <vendor>JogAmp Community</vendor> - <homepage href="http://jogamp.org/jogl-demos/"/> - <description>JOGL NEWT JNLP Applet Runner</description> - <offline-allowed/> - </information> - <update check="background" policy="always"/> - - <resources> - <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/> - <property name="sun.java2d.noddraw" value="true"/> - <jar href="jogl-demos.jar" main="true"/> - <jar href="jogl-demos-util.jar"/> - <extension name="newt-all-awt" href="JOGL_CODEBASE_TAG/newt-all-awt.jnlp" /> - </resources> - - <applet-desc - name="JOGLNewtApplet2Run-Applet" - main-class="demos.applets.JOGLNewtApplet1Run" - width="640" - height="480"> - </applet-desc> -</jnlp> diff --git a/jnlp-files/test.html b/jnlp-files/test.html new file mode 100644 index 0000000..8b4661e --- /dev/null +++ b/jnlp-files/test.html @@ -0,0 +1,67 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<html> +<head> +<title>JOGL Demos Test Page</title> +</head> +<body BGCOLOR="#ffffff"> + +<H2> Test page for JOGL demos </H2> + +<H3> Version </H3> +<ul> + <li><a href="../jogl-applet-version.html">Applet (JNLP/Launcher)</a></li> + <li><a href="../jogl-applet-version-lancheronly.html">Applet (Launcher Only)</a></li> + <li><a href="../jogl-application-version.jnlp">Application</a></li> +</ul> + +<H3> AWT JNLP Applet test with Applet Launcher fallback </H3> +<ul> + <li><a href="applet-gears.html">JNLP Applet test</a></li> + <li><a href="applet-gears-launcheronly.html">Applet Launcher test</a></li> +</ul> + +<!-- +<H3> AWT JNLP Applet's using native NEWT</H3> +<ul> +</ul> +--> + +<H3> AWT JNLP Applet's using native NEWT (JOGL NEWT Applet Runner)</H3> +<ul> + <li><a href="jogl-newt-applet-runner-gears.html">AWT Applet JOGL/NEWT GL2 Gears</a></li> + <li><a href="jogl-newt-applet-runner-cube.html">AWT Applet JOGL/NEWT GL2ES1 Cube</a></li> + <li><a href="jogl-newt-applet-runner-fbcubes.html">AWT Applet JOGL/NEWT GL2ES1 FBO Cubes</a></li> + <li><a href="jogl-newt-applet-runner-angelesgl2es1.html">AWT Applet JOGL/NEWT GL2ES1 Angeles</a></li> +</ul> + +<H3> JOAL test .. </H3> +<ul> + <li><a href="applet-gearsjoal.html">JOGL/JOAL Applet test</a></li> + <li><a href="applet-gearsjoal-launcheronly.html">JOGL/JOAL Applet test (Launcher Only)</a></li> +</ul> + +<H3> JNLP Launcher .. </H3> +<ul> + <li><a href="Gears.jnlp">Gears</a></li> + <li><a href="HWShadowmapsSimple.jnlp">Hardware Shadow Maps</a></li> + <li><a href="HDR.jnlp">HDR</a></li> + <li><a href="InfiniteShadowVolumes.jnlp">Infinite Shadow Volumes</a></li> + <li><a href="JRefractNoOGL.jnlp">JRefract</a></li> + <li><a href="JRefract.jnlp">JRefract with Java2D/JOGL Bridge (Java SE 6 only)</a></li> + <li><a href="ParticleEngine.jnlp">Particle Engine</a></li> + <li><a href="TestTextRenderer.jnlp">Text Renderer Test</a></li> + <li><a href="FlyingText.jnlp">Flying Text</a></li> + <li><a href="TextFlow.jnlp">Text Flow</a></li> + <li><a href="TextCube.jnlp">Text Cube</a></li> + <li><a href="VertexProgWarp.jnlp">Vertex Prog Warp</a></li> + <li><a href="VertexProgRefract.jnlp">Vertex Prog Refract</a></li> + <li><a href="ProceduralTexturePhysics.jnlp">Water</a></li> + <li><a href="XTrans.jnlp">XTrans (Java SE 6 only)</a></li> + <li><a href="VertexBufferObject.jnlp">Vertex Buffer Object</a></li> + <li><a href="VertexArrayRange.jnlp">Vertex Array Range</a></li> + <li><a href="WorldWindBasicDemo.jnlp">NASA World Wind Java (version hosted by NASA)</a></li> + <li><a href="worldwind.jnlp">NASA World Wind Java (older version copied from NASA)</a></li> +</ul> + +</body> +</html> diff --git a/jnlp-files/version.jnlp b/jnlp-files/version.jnlp index 1db0e07..bba6aa7 100644 --- a/jnlp-files/version.jnlp +++ b/jnlp-files/version.jnlp @@ -13,7 +13,7 @@ <resources>
<j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/>
<property name="sun.java2d.noddraw" value="true"/>
- <jar href="jogl-demos.jar" main="true"/>
+ <jar href="jar/jogl-demos.jar" main="true"/>
<extension name="jogl-all-awt" href="JOGL_CODEBASE_TAG/jogl-all-awt.jnlp" />
</resources>
diff --git a/jnlp-files/worldwind.jnlp b/jnlp-files/worldwind.jnlp index 22afb21..3ddf504 100644 --- a/jnlp-files/worldwind.jnlp +++ b/jnlp-files/worldwind.jnlp @@ -20,8 +20,7 @@ max-heap-size="512m"/> <property name="sun.java2d.noddraw" value="true"/> <jar href="worldwind.jar" main="true"/> - <extension name="jogl-all-awt" - href="JOGL_CODEBASE_TAG/jogl-all-awt.jnlp" version="JOGAMP_VERSION"/> + <extension name="jogl-all-awt" href="JOGL_CODEBASE_TAG/jogl-all-awt.jnlp" version="JOGAMP_VERSION"/> </resources> <application-desc main-class="worldwinddemo.BasicDemo"> <argument>NotFirstUIActionOnProcess</argument> diff --git a/make/build.xml b/make/build.xml index b424fe0..0a2a4f9 100644 --- a/make/build.xml +++ b/make/build.xml @@ -94,38 +94,17 @@ </target> <target name="init" depends="jogamp.env.init,gluegen.cpptasks.detect.os,java.class.path.validate,setup.gles,setup.cg.excludes,skip.cg.excludes,init.swt"> - <property name="jogl.core.jar" value="${jogl.build}/jogl/jogl.core.jar" /> - <condition property="jogl.cg.jar" value="${jogl.build}/jogl/jogl.cg.jar"> - <isset property="jogl.cg"/> - </condition> <property name="gluegen-rt.jar" value="${gluegen.build}/gluegen-rt.jar" /> - <property name="jogl.gles12.jar" value="${jogl.build}/jogl/jogl.gles12.jar" /> - <property name="jogl.gles12.dbg.jar" value="${jogl.build}/jogl/jogl.gles12.dbg.jar" /> - <property name="jogl.gles1.jar" value="${jogl.build}/jogl/jogl.gles1.jar" /> - <property name="jogl.gles1.dbg.jar" value="${jogl.build}/jogl/jogl.gles1.dbg.jar" /> - <property name="jogl.gles2.jar" value="${jogl.build}/jogl/jogl.gles2.jar" /> - <property name="jogl.gles2.dbg.jar" value="${jogl.build}/jogl/jogl.gles2.dbg.jar" /> - <property name="jogl.egl.jar" value="${jogl.build}/jogl/jogl.egl.jar" /> - <property name="jogl.gldesktop.jar" value="${jogl.build}/jogl/jogl.gldesktop.jar" /> - <property name="jogl.gldesktop.dbg.jar" value="${jogl.build}/jogl/jogl.gldesktop.dbg.jar" /> - <property name="jogl.awt.jar" value="${jogl.build}/jogl/jogl.awt.jar" /> - <property name="jogl.util.jar" value="${jogl.build}/jogl/jogl.util.jar" /> - <property name="jogl.util.awt.jar" value="${jogl.build}/jogl/jogl.util.awt.jar" /> - <property name="jogl.util.fixedfuncemu.jar" value="${jogl.build}/jogl/jogl.util.fixedfuncemu.jar" /> - <property name="jogl.util.gldesktop.jar" value="${jogl.build}/jogl/jogl.util.gldesktop.jar" /> - <property name="nativewindow.core.jar" value="${jogl.build}/nativewindow/nativewindow.core.jar" /> - <property name="nativewindow.x11.jar" value="${jogl.build}/nativewindow/nativewindow.x11.jar" /> - <property name="nativewindow.awt.jar" value="${jogl.build}/nativewindow/nativewindow.awt.jar" /> - <property name="newt.core.jar" value="${jogl.build}/newt/newt.core.jar" /> - <property name="newt.ogl.jar" value="${jogl.build}/newt/newt.ogl.jar" /> - <property name="newt.awt.jar" value="${jogl.build}/newt/newt.awt.jar" /> + <property name="jogl.all.jar" value="${jogl.build}/jar/jogl.all.jar" /> + <property name="jogl.cg.jar" value="${jogl.build}/jar/atomic/jogl.cg.jar" /> <property name="joal.jar" value="${joal.build}/joal.jar" /> <property name="simple-xml.jar" value="${project.root}/lib/simple-xml-1.1.1.jar" /> <property name="classes" value="${build}/classes" /> <property name="src" value="${project.root}/src" /> <property name="javadoc" value="${project.root}/javadoc" /> <!-- property name="javadoc.link" value="http://java.sun.com/j2se/1.4.2/docs/api/" /--> - <property name="javadoc.link" value="http://download.oracle.com/javase/1.5.0/docs/api/" /> + <!--property name="javadoc.link" value="http://download.oracle.com/javase/1.5.0/docs/api/" /--> + <property name="javadoc.link" value="http://docs.oracle.com/javase/6/docs/api/" /> <property name="javadoc.link.jogl" value="${jogl.root}/javadoc-public/" /> <property name="jogl.demos.jar" value="${build}/jogl-demos.jar" /> <property name="jogl.demos.util.jar" value="${build}/jogl-demos-util.jar" /> @@ -138,9 +117,15 @@ </target> <target name="nurbs" if="jogl.nurbs"> - <!-- NOTE: this target requires a 1.5 javac to be on the PATH --> - <javac destdir="${classes}" includes="demos/nurbs/**" source="1.5" debug="true" debuglevel="source,lines" - includeantruntime="false"> + <javac destdir="${classes}" + includeAntRuntime="false" + includes="demos/nurbs/**" + memoryMaximumSize="${javac.memorymax}" + encoding="UTF-8" + source="${target.sourcelevel}" + target="${target.targetlevel}" + bootclasspath="${target.rt.jar}" + debug="${javacdebug}" debuglevel="${javacdebuglevel}"> <src path="${src}" /> <classpath refid="jogl-demos.classpath" /> </javac> @@ -157,8 +142,14 @@ </target> <target name="redbook-javac"> - <javac destdir="${classes}" source="1.5" target="1.5" debug="true" debuglevel="source,lines" - includeantruntime="false"> + <javac destdir="${classes}" + includeantruntime="false" + memoryMaximumSize="${javac.memorymax}" + encoding="UTF-8" + source="${target.sourcelevel}" + target="${target.targetlevel}" + bootclasspath="${target.rt.jar}" + debug="${javacdebug}" debuglevel="${javacdebuglevel}"> <src path="${src}/redbook/src" /> <classpath refid="jogl-demos.classpath" /> </javac> @@ -167,33 +158,22 @@ <target name="all-desktop" unless="isGLES"> <mkdir dir="${classes}" /> <path id="jogl-demos.classpath"> - <pathelement location="${nativewindow.core.jar}" /> - <pathelement location="${nativewindow.x11.jar}" /> - <pathelement location="${nativewindow.awt.jar}" /> - <pathelement location="${jogl.core.jar}" /> + <pathelement location="${jogl.all.jar}" /> <pathelement location="${jogl.cg.jar}" /> - <pathelement location="${jogl.gles1.jar}" /> - <pathelement location="${jogl.gles1.dbg.jar}" /> - <pathelement location="${jogl.gles2.jar}" /> - <pathelement location="${jogl.gles2.dbg.jar}" /> - <pathelement location="${jogl.egl.jar}" /> - <pathelement location="${jogl.gldesktop.jar}" /> - <pathelement location="${jogl.gldesktop.dbg.jar}" /> - <pathelement location="${jogl.awt.jar}" /> - <pathelement location="${jogl.util.jar}" /> - <pathelement location="${jogl.util.fixedfuncemu.jar}" /> - <pathelement location="${jogl.util.awt.jar}" /> - <pathelement location="${jogl.util.gldesktop.jar}" /> - <pathelement location="${newt.core.jar}" /> - <pathelement location="${newt.ogl.jar}" /> - <pathelement location="${newt.awt.jar}" /> <pathelement location="${joal.jar}" /> <pathelement location="${gluegen-rt.jar}" /> <pathelement location="${simple-xml.jar}" /> <pathelement location="${swt.jar}" /> </path> - <javac destdir="${classes}" excludes="${jogl.cg.excludes},demos/nurbs/**,${jogl.swt.excludes},jbullet/**,${jogl.redbook.excludes}" source="1.5" debug="true" debuglevel="source,lines" - includeantruntime="false"> + <javac destdir="${classes}" + excludes="${jogl.cg.excludes},demos/nurbs/**,${jogl.swt.excludes},jbullet/**,${jogl.redbook.excludes}" + includeantruntime="false" + memoryMaximumSize="${javac.memorymax}" + encoding="UTF-8" + source="${target.sourcelevel}" + target="${target.targetlevel}" + bootclasspath="${target.rt.jar}" + debug="${javacdebug}" debuglevel="${javacdebuglevel}"> <src path="${src}" /> <classpath refid="jogl-demos.classpath" /> </javac> @@ -240,23 +220,19 @@ <echo message="classes destdir ${classes}" /> <mkdir dir="${classes}" /> <path id="jogl-demos.classpath"> - <pathelement location="${nativewindow.core.jar}" /> - <pathelement location="${nativewindow.x11.jar}" /> - <pathelement location="${jogl.core.jar}" /> - <pathelement location="${jogl.gles1.jar}" /> - <pathelement location="${jogl.gles1.dbg.jar}" /> - <pathelement location="${jogl.gles2.jar}" /> - <pathelement location="${jogl.gles2.dbg.jar}" /> - <pathelement location="${jogl.egl.jar}" /> - <pathelement location="${jogl.util.jar}" /> - <pathelement location="${jogl.util.fixedfuncemu.jar}" /> + <pathelement location="${jogl.all.jar}" /> + <pathelement location="${jogl.cg.jar}" /> <pathelement location="${gluegen-rt.jar}" /> - <pathelement location="${newt.core.jar}" /> - <pathelement location="${newt.ogl.jar}" /> </path> - <javac destdir="${classes}" includes="demos/GLInfo*,demos/es1/**,demos/es2/**" source="1.5" debug="true" debuglevel="source,lines" - includeantruntime="false"> - bootclasspath="${gluegen.root}/make/lib/cdc_fp.jar"> + <javac destdir="${classes}" + includes="demos/GLInfo*,demos/es1/**,demos/es2/**" + includeantruntime="false" + memoryMaximumSize="${javac.memorymax}" + encoding="UTF-8" + source="${target.sourcelevel}" + target="${target.targetlevel}" + bootclasspath="${target.rt.jar}" + debug="${javacdebug}" debuglevel="${javacdebuglevel}"> <src path="${src}" /> <classpath refid="jogl-demos.classpath" /> </javac> @@ -276,6 +252,8 @@ <target name="all" depends="init, all-desktop, all-gles, tag.build, developer-zip-archive" /> + <target name="all.ide" depends="init, all-desktop, all-gles" /> + <target name="tag.build"> <copy file="${jogl.build}/artifact.properties" todir="${build}" overwrite="true"/> <echo message='jogl-demos.build.number=${jogl-demos.build.number}${line.separator}' file="${build}/artifact.properties" append="true"/> @@ -286,8 +264,11 @@ <target name="javadoc" depends="init"> <mkdir dir="${javadoc}" /> - <javadoc destdir="${javadoc}" windowtitle="JOGL Demos" - source="1.5"> + <javadoc destdir="${javadoc}" + windowtitle="JOGL Demos" + encoding="UTF-8" + source="${target.sourcelevel}" + maxmemory="${javac.memorymax}" > <packageset dir="${src}"> <exclude name="demos/cg/**" /> </packageset> diff --git a/make/scripts/make.jogl.all.macosx.sh b/make/scripts/make.jogl.all.macosx.sh index 02f8ccc..d0f1475 100755 --- a/make/scripts/make.jogl.all.macosx.sh +++ b/make/scripts/make.jogl.all.macosx.sh @@ -1,10 +1,13 @@ #! /bin/sh -. /devtools/etc/profile.ant +SDIR=`dirname $0` # -Dc.compiler.debug=true +# -Djogl.cg=1 \ -ant -v \ - -Djogl.cg=1 \ +ant \ + -Dtarget.sourcelevel=1.6 \ + -Dtarget.targetlevel=1.6 \ + -Dtarget.rt.jar=/opt-share/jre1.6.0_30/lib/rt.jar \ -Drootrel.build=build-macosx \ $* 2>&1 | tee make.jogl.all.macosx.log diff --git a/make/scripts/make.jogl.all.x86.sh b/make/scripts/make.jogl.all.x86.sh index 41fa16b..004abbb 100755 --- a/make/scripts/make.jogl.all.x86.sh +++ b/make/scripts/make.jogl.all.x86.sh @@ -1,11 +1,17 @@ #! /bin/sh -. ../../setenv-build-jogl-x86.sh +SDIR=`dirname $0` + +if [ -e $SDIR/../../../gluegen/make/scripts/setenv-build-jogl-x86.sh ] ; then + . $SDIR/../../../gluegen/make/scripts/setenv-build-jogl-x86.sh +fi + +. $SDIR/../../../jogl/etc/profile.jogl JOGL_ALL $SDIR/../../../jogl/build-x86 # -Dc.compiler.debug=true ant \ -Djogl.cg=1 \ - -Duser.swt.jar=$HOME/.java/swt-3.6-gtk-linux-x86.jar \ + -Duser.swt.jar=$SWT_CLASSPATH \ -Drootrel.build=build-x86 \ $* 2>&1 | tee make.jogl.all.x86.log diff --git a/make/scripts/make.jogl.all.x86_64.sh b/make/scripts/make.jogl.all.x86_64.sh index dc49ee4..7d192b8 100755 --- a/make/scripts/make.jogl.all.x86_64.sh +++ b/make/scripts/make.jogl.all.x86_64.sh @@ -1,13 +1,22 @@ #! /bin/sh -. ../../setenv-build-jogl-x86_64.sh +SDIR=`dirname $0` + +if [ -e $SDIR/../../../gluegen/make/scripts/setenv-build-jogl-x86_64.sh ] ; then + . $SDIR/../../../gluegen/make/scripts/setenv-build-jogl-x86_64.sh +fi + +. $SDIR/../../../jogl/etc/profile.jogl JOGL_ALL $SDIR/../../../jogl/build-x86_64 # -Dc.compiler.debug=true # -Djogl.cg=1 \ # -Djogl.redbook=true \ ant \ + -Dtarget.sourcelevel=1.6 \ + -Dtarget.targetlevel=1.6 \ + -Dtarget.rt.jar=/opt-share/jre1.6.0_30/lib/rt.jar \ -Djogl.cg=1 \ - -Duser.swt.jar=$HOME/.java/swt.jar \ + -Duser.swt.jar=$SWT_CLASSPATH \ -Drootrel.build=build-x86_64 \ $* 2>&1 | tee make.jogl.all.x86_64.log diff --git a/make/scripts/make.jogl.cdcfp.macosx.sh b/make/scripts/make.jogl.cdcfp.macosx.sh deleted file mode 100755 index 8677f88..0000000 --- a/make/scripts/make.jogl.cdcfp.macosx.sh +++ /dev/null @@ -1,10 +0,0 @@ -#! /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/scripts/make.jogl.cdcfp.x86.sh b/make/scripts/make.jogl.cdcfp.x86.sh deleted file mode 100755 index 60b7f4a..0000000 --- a/make/scripts/make.jogl.cdcfp.x86.sh +++ /dev/null @@ -1,10 +0,0 @@ -#! /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/setenv-jogl.sh b/setenv-jogl.sh index 76ab00a..1f6fbf9 100644 --- a/setenv-jogl.sh +++ b/setenv-jogl.sh @@ -1,7 +1,7 @@ #! /bin/sh function print_usage() { - echo "Usage: $0 {JOGL_ALL|JOGL_ALL_NOAWT|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]" + echo "Usage: $0 {JOGL_ALL|JOGL_ALL_NOAWT|JOGL_ALL_MOBILE} [jogl-build-dir]" } if [ -z "$1" ] ; then diff --git a/src/demos/GLNewtRun.java b/src/demos/GLNewtRun.java index 5310a93..d02657c 100755 --- a/src/demos/GLNewtRun.java +++ b/src/demos/GLNewtRun.java @@ -233,11 +233,11 @@ public class GLNewtRun extends WindowAdapter implements KeyListener, MouseListen window.setFullscreen(fullscreen); // Size OpenGL to Video Surface window.setVisible(true); - window.enablePerfLog(true); + window.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err); do { window.display(); - } while (!quit && window.getDuration() < 20000) ; + } while (!quit && window.getTotalFPSDuration() < 20000) ; window.destroy(); diff --git a/src/demos/applets/JOGLNewtApplet1Run.java b/src/demos/applets/JOGLNewtApplet1Run.java deleted file mode 100755 index 0a5311b..0000000 --- a/src/demos/applets/JOGLNewtApplet1Run.java +++ /dev/null @@ -1,93 +0,0 @@ -package demos.applets; - -import java.applet.*; -import java.awt.Container; -import java.awt.event.MouseListener; -import java.awt.event.MouseMotionListener; -import java.awt.event.KeyListener; - -import javax.media.opengl.*; -import com.jogamp.newt.awt.NewtCanvasAWT; -import com.jogamp.newt.opengl.GLWindow; -import java.awt.BorderLayout; - -/** Shows how to deploy an applet using JOGL. This demo must be - referenced from a web page via an <applet> tag. */ - -public class JOGLNewtApplet1Run extends Applet { - GLWindow glWindow; - NewtCanvasAWT newtCanvasAWT; - JOGLNewtAppletBase base; - - public void init() { - if(!(this instanceof Container)) { - throw new RuntimeException("This Applet is not a AWT Container"); - } - Container container = (Container) this; // have to think about that, we may use a Container - - String glEventListenerClazzName=null; - String glProfileName=null; - int glSwapInterval=0; - boolean glDebug=false; - boolean glTrace=false; - String tmp; - try { - glEventListenerClazzName = getParameter("gl_event_listener_class"); - glProfileName = getParameter("gl_profile"); - glSwapInterval = JOGLNewtAppletBase.str2Int(getParameter("gl_swap_interval"), glSwapInterval); - glDebug = JOGLNewtAppletBase.str2Bool(getParameter("gl_debug"), glDebug); - glTrace = JOGLNewtAppletBase.str2Bool(getParameter("gl_trace"), glTrace); - } catch (Exception e) { - e.printStackTrace(); - } - if(null==glEventListenerClazzName) { - throw new RuntimeException("No applet parameter 'gl_event_listener_class'"); - } - base = new JOGLNewtAppletBase(glEventListenerClazzName, - glSwapInterval, - glDebug, - glTrace); - - try { - GLProfile.initSingleton(false); - GLCapabilities caps = new GLCapabilities(GLProfile.get(glProfileName)); - glWindow = GLWindow.create(caps); - newtCanvasAWT = new NewtCanvasAWT(glWindow); - container.setLayout(new BorderLayout()); - container.add(newtCanvasAWT, BorderLayout.CENTER); - base.init(glWindow); - if(base.isValid()) { - GLEventListener glEventListener = base.getGLEventListener(); - - if(glEventListener instanceof MouseListener) { - addMouseListener((MouseListener)glEventListener); - } - if(glEventListener instanceof MouseMotionListener) { - addMouseMotionListener((MouseMotionListener)glEventListener); - } - if(glEventListener instanceof KeyListener) { - addKeyListener((KeyListener)glEventListener); - } - } - } catch (Throwable t) { - throw new RuntimeException(t); - } - } - - public void start() { - base.start(); - } - - public void stop() { - base.stop(); - } - - public void destroy() { - glWindow.setVisible(false); // hide 1st - glWindow.reparentWindow(null); // get out of newtCanvasAWT - this.remove(newtCanvasAWT); // remove newtCanvasAWT - base.destroy(); // destroy glWindow unrecoverable - base=null; - } -} - diff --git a/src/demos/applets/JOGLNewtAppletBase.java b/src/demos/applets/JOGLNewtAppletBase.java deleted file mode 100755 index 9fa1bdc..0000000 --- a/src/demos/applets/JOGLNewtAppletBase.java +++ /dev/null @@ -1,243 +0,0 @@ -package demos.applets; - -import java.lang.reflect.*; - -import javax.media.nativewindow.NativeWindow; -import javax.media.opengl.*; -import com.jogamp.opengl.util.*; - -import com.jogamp.newt.event.*; -import com.jogamp.newt.opengl.GLWindow; - -/** Shows how to deploy an applet using JOGL. This demo must be - referenced from a web page via an <applet> tag. */ - -public class JOGLNewtAppletBase extends WindowAdapter implements KeyListener, MouseListener, GLEventListener { - String glEventListenerClazzName; - int glSwapInterval; - boolean glDebug; - boolean glTrace; - - GLEventListener glEventListener = null; - GLWindow glWindow = null; - Animator glAnimator=null; - boolean isValid = false; - NativeWindow awtParent; - - public JOGLNewtAppletBase(String glEventListenerClazzName, - int glSwapInterval, - boolean glDebug, - boolean glTrace) { - - this.glEventListenerClazzName=glEventListenerClazzName; - this.glSwapInterval=glSwapInterval; - this.glDebug = glDebug; - this.glTrace = glTrace; - } - - public GLEventListener getGLEventListener() { return glEventListener; } - public GLWindow getGLWindow() { return glWindow; } - public Animator getGLAnimator() { return glAnimator; } - public boolean isValid() { return isValid; } - - public static boolean str2Bool(String str, boolean def) { - if(null==str) return def; - try { - return Boolean.valueOf(str).booleanValue(); - } catch (Exception ex) { ex.printStackTrace(); } - return def; - } - - public static int str2Int(String str, int def) { - if(null==str) return def; - try { - return Integer.parseInt(str); - } catch (Exception ex) { ex.printStackTrace(); } - return def; - } - - public static GLEventListener createInstance(String clazzName) { - Object instance = null; - - try { - Class clazz = Class.forName(clazzName); - instance = clazz.newInstance(); - } catch (Throwable t) { - t.printStackTrace(); - throw new RuntimeException("Error while instantiating demo: "+clazzName); - } - if( null == instance ) { - throw new RuntimeException("Null GLEventListener: "+clazzName); - } - if( !(instance instanceof GLEventListener) ) { - throw new RuntimeException("Not a GLEventListener: "+clazzName); - } - return (GLEventListener) instance; - } - - public static boolean setField(Object instance, String fieldName, Object value) { - try { - Field f = instance.getClass().getField(fieldName); - if(f.getType().isInstance(value)) { - f.set(instance, value); - return true; - } else { - System.out.println(instance.getClass()+" '"+fieldName+"' field not assignable with "+value.getClass()+", it's a: "+f.getType()); - } - } catch (NoSuchFieldException nsfe) { - System.out.println(instance.getClass()+" has no '"+fieldName+"' field"); - } catch (Throwable t) { - t.printStackTrace(); - } - return false; - } - - public void init(GLWindow glWindow) { - init(Thread.currentThread().getThreadGroup(), glWindow); - } - - public void init(ThreadGroup tg, GLWindow glWindow) { - this.glWindow = glWindow; - - glEventListener = createInstance(glEventListenerClazzName); - - try { - if(!setField(glEventListener, "window", glWindow)) { - setField(glEventListener, "glWindow", glWindow); - } - - glWindow.addGLEventListener(this); - glWindow.addGLEventListener(glEventListener); - - if(glEventListener instanceof WindowListener) { - glWindow.addWindowListener((WindowListener)glEventListener); - } - glWindow.addWindowListener(this); - - if(glEventListener instanceof MouseListener) { - glWindow.addMouseListener((MouseListener)glEventListener); - } - glWindow.addMouseListener(this); - - if(glEventListener instanceof KeyListener) { - glWindow.addKeyListener((KeyListener)glEventListener); - } - glWindow.addKeyListener(this); - - glWindow.enablePerfLog(true); - - // glAnimator = new FPSAnimator(canvas, 60); - glAnimator = new Animator(tg, glWindow); - } catch (Throwable t) { - throw new RuntimeException(t); - } - isValid = true; - } - - public void start() { - if(isValid) { - glWindow.setVisible(true); - glAnimator.start(); - awtParent = glWindow.getParent(); - if(null==awtParent) { - throw new RuntimeException("Parent of GLWindow is null: "+glWindow); - } - } - } - - public void stop() { - if(null!=glAnimator) { - glAnimator.stop(); - glWindow.setVisible(false); - } - } - - public void destroy() { - isValid = false; - if(null!=glAnimator) { - glAnimator.stop(); - glAnimator.remove(glWindow); - glAnimator=null; - } - if(null!=glWindow) { - glWindow.destroy(); - glWindow=null; - } - } - - // *********************************************************************************** - // *********************************************************************************** - // *********************************************************************************** - - public void init(GLAutoDrawable drawable) { - GL _gl = drawable.getGL(); - - if(glDebug) { - try { - _gl = _gl.getContext().setGL( GLPipelineFactory.create("javax.media.opengl.Debug", null, _gl, null) ); - } catch (Exception e) {e.printStackTrace();} - } - - if(glTrace) { - try { - // Trace .. - _gl = _gl.getContext().setGL( GLPipelineFactory.create("javax.media.opengl.Trace", null, _gl, new Object[] { System.err } ) ); - } catch (Exception e) {e.printStackTrace();} - } - - if(glSwapInterval>=0) { - _gl.setSwapInterval(glSwapInterval); - } - } - public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) { - } - public void display(GLAutoDrawable drawable) { - } - public void dispose(GLAutoDrawable drawable) { - } - - // *********************************************************************************** - // *********************************************************************************** - // *********************************************************************************** - - public void keyPressed(KeyEvent e) { - } - public void keyReleased(KeyEvent e) { - } - public void keyTyped(KeyEvent e) { - if(e.getKeyChar()=='d') { - glWindow.setUndecorated(!glWindow.isUndecorated()); - } if(e.getKeyChar()=='f') { - glWindow.setFullscreen(!glWindow.isFullscreen()); - } else if(e.getKeyChar()=='r') { - if(null == glWindow.getParent()) { - glWindow.reparentWindow(awtParent); - } else { - glWindow.reparentWindow(null); - } - } - } - - // *********************************************************************************** - // *********************************************************************************** - // *********************************************************************************** - - public void mouseClicked(MouseEvent e) { - } - public void mouseEntered(MouseEvent e) { - } - public void mouseExited(MouseEvent e) { - } - public void mousePressed(MouseEvent e) { - } - public void mouseReleased(MouseEvent e) { - } - public void mouseMoved(MouseEvent e) { - } - public void mouseDragged(MouseEvent e) { - } - public void mouseWheelMoved(MouseEvent e) { - } - -} - diff --git a/src/demos/context/DualContext.java b/src/demos/context/DualContext.java index 562b1fd..318a399 100755 --- a/src/demos/context/DualContext.java +++ b/src/demos/context/DualContext.java @@ -167,6 +167,6 @@ public class DualContext extends Canvas { if (config == null) { return null; } - return config.getGraphicsConfiguration(); + return config.getAWTGraphicsConfiguration(); } } diff --git a/src/demos/cubefbo/FBCubes.java b/src/demos/cubefbo/FBCubes.java index 14aca21..765c37f 100755 --- a/src/demos/cubefbo/FBCubes.java +++ b/src/demos/cubefbo/FBCubes.java @@ -55,8 +55,8 @@ class FBCubes implements GLEventListener, MouseListener, MouseMotionListener { cubeInner = new CubeObject(false); cubeMiddle = new CubeObject(true); cubeOuter = new CubeObject(true); - fbo1 = new FBObject(FBO_SIZE, FBO_SIZE, 0); - fbo2 = new FBObject(FBO_SIZE, FBO_SIZE, 0); + fbo1 = new FBObject(FBO_SIZE, FBO_SIZE); + fbo2 = new FBObject(FBO_SIZE, FBO_SIZE); } public void init(GLAutoDrawable drawable) { @@ -64,7 +64,11 @@ class FBCubes implements GLEventListener, MouseListener, MouseMotionListener { // drawable.setGL(new DebugGL2(gl)); // gl = drawable.getGL().getGL2(); fbo1.init(gl); + fbo1.attachTexture2D(gl, 0, gl.GL_NEAREST, gl.GL_NEAREST, 0, 0); + fbo1.unbind(gl); fbo2.init(gl); + fbo2.attachTexture2D(gl, 0, gl.GL_NEAREST, gl.GL_NEAREST, 0, 0); + fbo2.unbind(gl); } int x, y, width, height; @@ -111,10 +115,10 @@ class FBCubes implements GLEventListener, MouseListener, MouseMotionListener { for (int i = 0; i < MAX_ITER; i++) { rend.bind(gl); gl.glEnable (GL.GL_TEXTURE_2D); - gl.glBindTexture(GL.GL_TEXTURE_2D, tex.getTextureName()); // to use it .. + tex.use(gl, 0); cubeMiddle.reshape(gl, 0, 0, FBO_SIZE, FBO_SIZE); cubeMiddle.display(gl, xRot, yRot); - gl.glBindTexture(GL.GL_TEXTURE_2D, 0); + tex.unuse(gl); gl.glDisable (GL.GL_TEXTURE_2D); rend.unbind(gl); FBObject tmp = tex; @@ -130,10 +134,10 @@ class FBCubes implements GLEventListener, MouseListener, MouseMotionListener { gl.glClearColor(0, 0, 0, 1); gl.glEnable (GL.GL_TEXTURE_2D); - gl.glBindTexture(GL.GL_TEXTURE_2D, tex.getTextureName()); // to use it .. + tex.use(gl, 0); cubeOuter.display(gl, xRot, yRot); // System.out.println("display .. p8"); - gl.glBindTexture(GL.GL_TEXTURE_2D, 0); + tex.unuse(gl); gl.glDisable (GL.GL_TEXTURE_2D); } diff --git a/src/demos/data/images/Stars.png b/src/demos/data/images/Stars.png Binary files differnew file mode 100644 index 0000000..49cec37 --- /dev/null +++ b/src/demos/data/images/Stars.png diff --git a/src/demos/data/images/TennisBottom.png b/src/demos/data/images/TennisBottom.png Binary files differnew file mode 100644 index 0000000..d712dd6 --- /dev/null +++ b/src/demos/data/images/TennisBottom.png diff --git a/src/demos/data/images/TennisEnDesk.png b/src/demos/data/images/TennisEnDesk.png Binary files differnew file mode 100644 index 0000000..d9c4306 --- /dev/null +++ b/src/demos/data/images/TennisEnDesk.png diff --git a/src/demos/data/images/TennisMyDesk.png b/src/demos/data/images/TennisMyDesk.png Binary files differnew file mode 100644 index 0000000..d4a3514 --- /dev/null +++ b/src/demos/data/images/TennisMyDesk.png diff --git a/src/demos/data/images/TennisTop.png b/src/demos/data/images/TennisTop.png Binary files differnew file mode 100644 index 0000000..c014744 --- /dev/null +++ b/src/demos/data/images/TennisTop.png diff --git a/src/demos/es1/RedSquare.java b/src/demos/es1/RedSquare.java index 1049ee7..951eed0 100755 --- a/src/demos/es1/RedSquare.java +++ b/src/demos/es1/RedSquare.java @@ -131,12 +131,12 @@ public class RedSquare extends Thread implements WindowListener, KeyListener, Mo window.addKeyListener(this); window.addGLEventListener(this); - window.enablePerfLog(true); + window.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err); // Size OpenGL to Video Surface window.setSize(width, height); // window.setFullscreen(true); window.setVisible(true); - window.enablePerfLog(true); + window.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err); if(!oneThread) { if(useAnimator) { @@ -152,7 +152,7 @@ public class RedSquare extends Thread implements WindowListener, KeyListener, Mo } else { do { display(); - } while (!quit && window.getDuration() < 11000) ; + } while (!quit && window.getTotalFPSDuration() < 11000) ; shutdown(); } } @@ -213,7 +213,7 @@ public class RedSquare extends Thread implements WindowListener, KeyListener, Mo glTrace = false; } - GL2ES1 gl = FixedFuncUtil.getFixedFuncImpl(_gl); + GL2ES1 gl = FixedFuncUtil.wrapFixedFuncEmul(_gl); if(swapInterval>=0) { gl.setSwapInterval(swapInterval); } @@ -284,7 +284,7 @@ public class RedSquare extends Thread implements WindowListener, KeyListener, Mo gl.glMatrixMode(gl.GL_MODELVIEW); gl.glLoadIdentity(); gl.glTranslatef(0, 0, -10); - float ang = ((float) window.getDuration() * 360.0f) / 4000.0f; + float ang = ((float) window.getTotalFPSDuration() * 360.0f) / 4000.0f; gl.glRotatef(ang, 0, 0, 1); gl.glRotatef(ang, 0, 1, 0); diff --git a/src/demos/es1/angeles/AngelesGL.java b/src/demos/es1/angeles/AngelesGL.java index bc367d7..42dbf76 100755 --- a/src/demos/es1/angeles/AngelesGL.java +++ b/src/demos/es1/angeles/AngelesGL.java @@ -86,7 +86,7 @@ public class AngelesGL implements GLEventListener { cComps = drawable.getGL().isGLES1() ? 4: 3; - this.gl = FixedFuncUtil.getFixedFuncImpl(drawable.getGL()); + this.gl = FixedFuncUtil.wrapFixedFuncEmul(drawable.getGL()); System.err.println("AngelesGL: "+this.gl); this.glu = GLU.createGLU(); @@ -298,14 +298,14 @@ public class GLSpatial { int[] tmp = new int[1]; gl.glGenBuffers(1, tmp, 0); vboName = tmp[0]; - - vArrayData = GLArrayDataWrapper.createFixed(gl, gl.GL_VERTEX_ARRAY, vComps, GL.GL_FLOAT, false, - 0, pBuffer, vboName, vOffset); - cArrayData = GLArrayDataWrapper.createFixed(gl, gl.GL_COLOR_ARRAY, cComps, GL.GL_FLOAT, false, - 0, pBuffer, vboName, cOffset); + + vArrayData = GLArrayDataWrapper.createFixed(gl.GL_VERTEX_ARRAY, vComps, GL.GL_FLOAT, false, + 0, pBuffer, vboName, vOffset, GL.GL_STATIC_DRAW, GL.GL_ARRAY_BUFFER); + cArrayData = GLArrayDataWrapper.createFixed(gl.GL_COLOR_ARRAY, cComps, GL.GL_FLOAT, false, + 0, pBuffer, vboName, cOffset, GL.GL_STATIC_DRAW, GL.GL_ARRAY_BUFFER); if(useNormalArray) { - nArrayData = GLArrayDataWrapper.createFixed(gl, gl.GL_NORMAL_ARRAY, nComps, GL.GL_FLOAT, false, - 0, pBuffer, vboName, nOffset); + nArrayData = GLArrayDataWrapper.createFixed(gl.GL_NORMAL_ARRAY, nComps, GL.GL_FLOAT, false, + 0, pBuffer, vboName, nOffset, GL.GL_STATIC_DRAW, GL.GL_ARRAY_BUFFER); } } diff --git a/src/demos/es1/angeles/AngelesGLil.java b/src/demos/es1/angeles/AngelesGLil.java index 92be109..3e96dc1 100755 --- a/src/demos/es1/angeles/AngelesGLil.java +++ b/src/demos/es1/angeles/AngelesGLil.java @@ -82,7 +82,7 @@ public class AngelesGLil implements GLEventListener { cComps = drawable.getGL().isGLES1() ? 4: 3; - this.gl = FixedFuncUtil.getFixedFuncImpl(drawable.getGL()); + this.gl = FixedFuncUtil.wrapFixedFuncEmul(drawable.getGL()); System.err.println("AngelesGL: "+this.gl); this.glu = GLU.createGLU(); @@ -298,13 +298,13 @@ public class GLSpatial { interlArray.position(count*(vComps+cComps+nComps)); interlArray.flip(); - vArrayData = GLArrayDataWrapper.createFixed(gl, gl.GL_VERTEX_ARRAY, vComps, GL.GL_FLOAT, false, - bStride, pBuffer, vboName, vOffset); - cArrayData = GLArrayDataWrapper.createFixed(gl, gl.GL_COLOR_ARRAY, cComps, GL.GL_FLOAT, false, - bStride, pBuffer, vboName, cOffset); + vArrayData = GLArrayDataWrapper.createFixed(gl.GL_VERTEX_ARRAY, vComps, GL.GL_FLOAT, false, + bStride, pBuffer, vboName, vOffset, GL.GL_STATIC_DRAW, GL.GL_ARRAY_BUFFER); + cArrayData = GLArrayDataWrapper.createFixed(gl.GL_COLOR_ARRAY, cComps, GL.GL_FLOAT, false, + bStride, pBuffer, vboName, cOffset, GL.GL_STATIC_DRAW, GL.GL_ARRAY_BUFFER); if(useNormalArray) { - nArrayData = GLArrayDataWrapper.createFixed(gl, gl.GL_NORMAL_ARRAY, nComps, GL.GL_FLOAT, false, - bStride, pBuffer, vboName, nOffset); + nArrayData = GLArrayDataWrapper.createFixed(gl.GL_NORMAL_ARRAY, nComps, GL.GL_FLOAT, false, + bStride, pBuffer, vboName, nOffset, GL.GL_STATIC_DRAW, GL.GL_ARRAY_BUFFER); } } diff --git a/src/demos/es1/angeles/Main.java b/src/demos/es1/angeles/Main.java index 743f961..ad1a5b5 100755 --- a/src/demos/es1/angeles/Main.java +++ b/src/demos/es1/angeles/Main.java @@ -75,7 +75,7 @@ public class Main implements WindowListener, MouseListener { window.addWindowListener(this); window.addMouseListener(this); - window.enablePerfLog(true); + window.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err); window.setSize(width, height); window.setFullscreen(true); window.setVisible(true); @@ -97,7 +97,7 @@ public class Main implements WindowListener, MouseListener { } } - while (!quit && window.getDuration() < 215000) { + while (!quit && window.getTotalFPSDuration() < 215000) { window.display(); } diff --git a/src/demos/es1/cube/Cube.java b/src/demos/es1/cube/Cube.java index fa88674..001f821 100644 --- a/src/demos/es1/cube/Cube.java +++ b/src/demos/es1/cube/Cube.java @@ -95,7 +95,7 @@ public class Cube implements GLEventListener { } catch (Exception e) {e.printStackTrace();} } - GL2ES1 gl = FixedFuncUtil.getFixedFuncImpl(_gl); + GL2ES1 gl = FixedFuncUtil.wrapFixedFuncEmul(_gl); glu = GLU.createGLU(); @@ -338,13 +338,13 @@ public class Cube implements GLEventListener { window.addGLEventListener(this); - window.enablePerfLog(true); + window.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err); // Size OpenGL to Video Surface window.setSize(width, height); window.setFullscreen(true); window.setVisible(true); - while (!quit && window.getDuration() < 31000) { + while (!quit && window.getTotalFPSDuration() < 31000) { window.display(); } diff --git a/src/demos/es1/cube/CubeImmModeSink.java b/src/demos/es1/cube/CubeImmModeSink.java index a75b274..81f89d8 100644 --- a/src/demos/es1/cube/CubeImmModeSink.java +++ b/src/demos/es1/cube/CubeImmModeSink.java @@ -167,7 +167,7 @@ public class CubeImmModeSink implements GLEventListener { } public void init(GLAutoDrawable drawable) { - GL2ES1 gl = FixedFuncUtil.getFixedFuncImpl(drawable.getGL()); + GL2ES1 gl = FixedFuncUtil.wrapFixedFuncEmul(drawable.getGL()); glu = GLU.createGLU(); @@ -403,7 +403,7 @@ public class CubeImmModeSink implements GLEventListener { window.addGLEventListener(this); - window.enablePerfLog(true); + window.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err); // Size OpenGL to Video Surface window.setSize(width, height); window.setFullscreen(true); diff --git a/src/demos/es1/cubefbo/FBCubes.java b/src/demos/es1/cubefbo/FBCubes.java index b6a1b0d..b658798 100755 --- a/src/demos/es1/cubefbo/FBCubes.java +++ b/src/demos/es1/cubefbo/FBCubes.java @@ -45,7 +45,7 @@ public class FBCubes implements GLEventListener { public FBCubes () { cubeOuter = new Cube(true, false); - fbo1 = new FBObject(FBO_SIZE, FBO_SIZE, FBObject.ATTR_DEPTH); + fbo1 = new FBObject(FBO_SIZE, FBO_SIZE); cubeInner = new Cube(false, true); // JAU cubeMiddle = new Cube(true, false); @@ -53,7 +53,7 @@ public class FBCubes implements GLEventListener { } public void init(GLAutoDrawable drawable) { - GL2ES1 gl = FixedFuncUtil.getFixedFuncImpl(drawable.getGL()); + GL2ES1 gl = FixedFuncUtil.wrapFixedFuncEmul(drawable.getGL()); System.out.println(gl); gl.glGetError(); // flush error .. @@ -73,10 +73,13 @@ public class FBCubes implements GLEventListener { }*/ fbo1.init(gl); - //fbo1.init(gl, GL.GL_RGB, GL.GL_RGB, GL.GL_UNSIGNED_BYTE); // faster - //fbo1.init(gl, GL.GL_RGBA, GL.GL_RGBA, GL.GL_UNSIGNED_BYTE); // GLES2 default - //fbo1.init(gl, GL.GL_RGBA, GL.GL_RGBA, GL.GL_UNSIGNED_SHORT_5_5_5_1); // useless (1bit alpha) - //fbo1.init(gl, GL.GL_RGBA8, GL2.GL_BGRA, GL2.GL_UNSIGNED_INT_8_8_8_8_REV); // GL2 default + fbo1.attachTexture2D(gl, 0, GL2ES2.GL_NEAREST, GL2ES2.GL_NEAREST, 0, 0); + fbo1.attachDepthBuffer(gl, GL.GL_DEPTH_COMPONENT16); + //fbo1.init(gl, GL.GL_RGB, GL.GL_RGB, GL.GL_UNSIGNED_BYTE, GL2ES2.GL_NEAREST, GL2ES2.GL_NEAREST, 0, 0); // faster + //fbo1.init(gl, GL.GL_RGBA, GL.GL_RGBA, GL.GL_UNSIGNED_BYTE, GL2ES2.GL_NEAREST, GL2ES2.GL_NEAREST, 0, 0); // GLES2 default + //fbo1.init(gl, GL.GL_RGBA, GL.GL_RGBA, GL.GL_UNSIGNED_SHORT_5_5_5_1, GL2ES2.GL_NEAREST, GL2ES2.GL_NEAREST, 0, 0); // useless (1bit alpha) + //fbo1.init(gl, GL.GL_RGBA8, GL2.GL_BGRA, GL2.GL_UNSIGNED_INT_8_8_8_8_REV, GL2ES2.GL_NEAREST, GL2ES2.GL_NEAREST, 0, 0); // GL2 default + fbo1.unbind(gl); cubeInner.init(drawable); cubeOuter.init(drawable); @@ -113,13 +116,11 @@ public class FBCubes implements GLEventListener { gl.glFinish(); fbo1.unbind(gl); - gl.glActiveTexture(GL.GL_TEXTURE0); gl.glEnable (gl.GL_TEXTURE_2D); + fbo1.use(gl, 0); cubeOuter.reshape(drawable, 0, 0, drawable.getWidth(), drawable.getHeight()); - fbo1.use(gl); cubeOuter.display(drawable); - fbo1.unbind(gl); - + fbo1.unuse(gl); gl.glDisable (gl.GL_TEXTURE_2D); // JAUFBObject tex = fbo1; diff --git a/src/demos/es1/cubefbo/Main.java b/src/demos/es1/cubefbo/Main.java index cd26556..b2da7a5 100755 --- a/src/demos/es1/cubefbo/Main.java +++ b/src/demos/es1/cubefbo/Main.java @@ -76,7 +76,7 @@ public class Main implements WindowListener, MouseListener { window.addWindowListener(this); window.addMouseListener(this); - window.enablePerfLog(true); + window.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err); window.setSize(width, height); window.setFullscreen(false); window.setVisible(true); @@ -85,7 +85,7 @@ public class Main implements WindowListener, MouseListener { FBCubes cubes = new FBCubes(); window.addGLEventListener(cubes); - while ( !quit && window.getDuration() < 31000) { + while ( !quit && window.getTotalFPSDuration() < 31000) { window.display(); } diff --git a/src/demos/es2/RedSquare.java b/src/demos/es2/RedSquare.java index 1d0bcad..c335478 100755 --- a/src/demos/es2/RedSquare.java +++ b/src/demos/es2/RedSquare.java @@ -118,12 +118,12 @@ public class RedSquare extends Thread implements WindowListener, KeyListener, Mo window.setSize(width, height); // window.setFullscreen(true); window.setVisible(true); - window.enablePerfLog(true); + window.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err); if(!oneThread) { do { display(); - } while (!quit && window.getDuration() < 20000) ; + } while (!quit && window.getTotalFPSDuration() < 20000) ; shutdown(); } @@ -212,18 +212,18 @@ public class RedSquare extends Thread implements WindowListener, KeyListener, Mo initShader(gl); // Push the 1st uniform down the path - st.glUseProgram(gl, true); + st.useProgram(gl, true); pmvMatrix.glMatrixMode(pmvMatrix.GL_PROJECTION); pmvMatrix.glLoadIdentity(); pmvMatrix.glMatrixMode(pmvMatrix.GL_MODELVIEW); pmvMatrix.glLoadIdentity(); - if(!st.glUniform(gl, new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.glGetPMvMatrixf()))) { + if(!st.uniform(gl, new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.glGetPMvMatrixf()))) { throw new GLException("Error setting PMVMatrix in shader: "+st); } // Allocate vertex arrays - GLArrayDataClient vertices = GLArrayDataClient.createGLSL(gl, "mgl_Vertex", 3, gl.GL_FLOAT, false, 4); + GLArrayDataClient vertices = GLArrayDataClient.createGLSL("mgl_Vertex", 3, gl.GL_FLOAT, false, 4); { // Fill them up FloatBuffer verticeb = (FloatBuffer)vertices.getBuffer(); @@ -234,7 +234,7 @@ public class RedSquare extends Thread implements WindowListener, KeyListener, Mo } vertices.seal(gl, true); - GLArrayDataClient colors = GLArrayDataClient.createGLSL(gl, "mgl_Color", 4, gl.GL_FLOAT, false, 4); + GLArrayDataClient colors = GLArrayDataClient.createGLSL("mgl_Color", 4, gl.GL_FLOAT, false, 4); { // Fill them up FloatBuffer colorb = (FloatBuffer)colors.getBuffer(); @@ -249,7 +249,7 @@ public class RedSquare extends Thread implements WindowListener, KeyListener, Mo gl.glClearColor(0, 0, 0, 1); gl.glEnable(GL2ES2.GL_DEPTH_TEST); - st.glUseProgram(gl, false); + st.useProgram(gl, false); // Let's show the completed shader state .. System.out.println(Thread.currentThread()+" "+st); @@ -260,7 +260,7 @@ public class RedSquare extends Thread implements WindowListener, KeyListener, Mo GL2ES2 gl = drawable.getGL().getGL2ES2(); - st.glUseProgram(gl, true); + st.useProgram(gl, true); // Set location in front of camera pmvMatrix.glMatrixMode(pmvMatrix.GL_PROJECTION); @@ -271,10 +271,10 @@ public class RedSquare extends Thread implements WindowListener, KeyListener, Mo GLUniformData ud = st.getUniform("mgl_PMVMatrix"); if(null!=ud) { // same data object - st.glUniform(gl, ud); + st.uniform(gl, ud); } - st.glUseProgram(gl, false); + st.useProgram(gl, false); } public void dispose(GLAutoDrawable drawable) { @@ -295,7 +295,7 @@ public class RedSquare extends Thread implements WindowListener, KeyListener, Mo GL2ES2 gl = drawable.getGL().getGL2ES2(); - st.glUseProgram(gl, true); + st.useProgram(gl, true); gl.glClear(gl.GL_COLOR_BUFFER_BIT | gl.GL_DEPTH_BUFFER_BIT); @@ -303,20 +303,20 @@ public class RedSquare extends Thread implements WindowListener, KeyListener, Mo pmvMatrix.glMatrixMode(pmvMatrix.GL_MODELVIEW); pmvMatrix.glLoadIdentity(); pmvMatrix.glTranslatef(0, 0, -10); - float ang = ((float) window.getDuration() * 360.0f) / 4000.0f; + float ang = ((float) window.getTotalFPSDuration() * 360.0f) / 4000.0f; pmvMatrix.glRotatef(ang, 0, 0, 1); pmvMatrix.glRotatef(ang, 0, 1, 0); GLUniformData ud = st.getUniform("mgl_PMVMatrix"); if(null!=ud) { // same data object - st.glUniform(gl, ud); + st.uniform(gl, ud); } // Draw a square gl.glDrawArrays(gl.GL_TRIANGLE_STRIP, 0, 4); - st.glUseProgram(gl, false); + st.useProgram(gl, false); } public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) { diff --git a/src/demos/es2/openmax/Cube.java b/src/demos/es2/openmax/Cube.java index 5d318cf..51578dd 100644 --- a/src/demos/es2/openmax/Cube.java +++ b/src/demos/es2/openmax/Cube.java @@ -93,7 +93,7 @@ public class Cube implements GLEventListener { } public void init(GLAutoDrawable drawable) { - GL2ES1 gl = FixedFuncUtil.getFixedFuncImpl(drawable.getGL()); + GL2ES1 gl = FixedFuncUtil.wrapFixedFuncEmul(drawable.getGL()); glu = GLU.createGLU(); @@ -330,13 +330,13 @@ public class Cube implements GLEventListener { window.addGLEventListener(this); - window.enablePerfLog(true); + window.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err); // Size OpenGL to Video Surface window.setSize(width, height); window.setFullscreen(true); window.setVisible(true); - while (!quit && window.getDuration() < 31000) { + while (!quit && window.getTotalFPSDuration() < 31000) { window.display(); } diff --git a/src/demos/es2/openmax/MovieCube.java b/src/demos/es2/openmax/MovieCube.java index 6b53c6d..932fcf8 100755 --- a/src/demos/es2/openmax/MovieCube.java +++ b/src/demos/es2/openmax/MovieCube.java @@ -122,7 +122,7 @@ public class MovieCube implements MouseListener, GLEventListener, OMXEventListen } public void init(GLAutoDrawable drawable) { - GL2ES1 gl = FixedFuncUtil.getFixedFuncImpl(drawable.getGL()); + GL2ES1 gl = FixedFuncUtil.wrapFixedFuncEmul(drawable.getGL()); System.out.println(gl); gl.glGetError(); // flush error .. @@ -185,13 +185,13 @@ public class MovieCube implements MouseListener, GLEventListener, OMXEventListen tex=movie.getNextTextureID(); if(null!=tex) { System.out.println("Use: "+tex); - tex.enable(); - tex.bind(); + tex.enable(gl); + tex.bind(gl); } } cube.display(drawable); if(null!=tex) { - tex.disable(); + tex.disable(gl); } } diff --git a/src/demos/es2/openmax/MovieSimple.java b/src/demos/es2/openmax/MovieSimple.java index 015d3b5..d6c8c7b 100755 --- a/src/demos/es2/openmax/MovieSimple.java +++ b/src/demos/es2/openmax/MovieSimple.java @@ -169,17 +169,17 @@ public class MovieSimple implements MouseListener, GLEventListener, OMXEventList initShader(gl); // Push the 1st uniform down the path - st.glUseProgram(gl, true); + st.useProgram(gl, true); pmvMatrix.glMatrixMode(pmvMatrix.GL_PROJECTION); pmvMatrix.glLoadIdentity(); pmvMatrix.glMatrixMode(pmvMatrix.GL_MODELVIEW); pmvMatrix.glLoadIdentity(); - if(!st.glUniform(gl, new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.glGetPMvMatrixf()))) { + if(!st.uniform(gl, new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.glGetPMvMatrixf()))) { throw new GLException("Error setting PMVMatrix in shader: "+st); } - if(!st.glUniform(gl, new GLUniformData("mgl_ActiveTexture", 0))) { + if(!st.uniform(gl, new GLUniformData("mgl_ActiveTexture", 0))) { throw new GLException("Error setting mgl_ActiveTexture in shader: "+st); } gl.glActiveTexture(GL.GL_TEXTURE0); @@ -197,7 +197,7 @@ public class MovieSimple implements MouseListener, GLEventListener, OMXEventList } // Allocate vertex array - GLArrayDataServer vertices = GLArrayDataServer.createGLSL(gl, "mgl_Vertex", 3, gl.GL_FLOAT, false, 4, GL.GL_STATIC_DRAW); + GLArrayDataServer vertices = GLArrayDataServer.createGLSL("mgl_Vertex", 3, gl.GL_FLOAT, false, 4, GL.GL_STATIC_DRAW); { // Fill them up FloatBuffer verticeb = (FloatBuffer)vertices.getBuffer(); @@ -209,7 +209,7 @@ public class MovieSimple implements MouseListener, GLEventListener, OMXEventList vertices.seal(gl, true); // Allocate texcoord array - GLArrayDataServer texcoord = GLArrayDataServer.createGLSL(gl, "mgl_MultiTexCoord", 2, gl.GL_FLOAT, false, 4, GL.GL_STATIC_DRAW); + GLArrayDataServer texcoord = GLArrayDataServer.createGLSL("mgl_MultiTexCoord", 2, gl.GL_FLOAT, false, 4, GL.GL_STATIC_DRAW); { // Fill them up FloatBuffer texcoordb = (FloatBuffer)texcoord.getBuffer(); @@ -220,7 +220,7 @@ public class MovieSimple implements MouseListener, GLEventListener, OMXEventList } texcoord.seal(gl, true); - GLArrayDataServer colors = GLArrayDataServer.createGLSL(gl, "mgl_Color", 4, gl.GL_FLOAT, false, 4, GL.GL_STATIC_DRAW); + GLArrayDataServer colors = GLArrayDataServer.createGLSL("mgl_Color", 4, gl.GL_FLOAT, false, 4, GL.GL_STATIC_DRAW); { // Fill them up FloatBuffer colorb = (FloatBuffer)colors.getBuffer(); @@ -235,7 +235,7 @@ public class MovieSimple implements MouseListener, GLEventListener, OMXEventList gl.glClearColor(0.2f, 0.2f, 0.2f, 1); gl.glEnable(GL2ES2.GL_DEPTH_TEST); - st.glUseProgram(gl, false); + st.useProgram(gl, false); // Let's show the completed shader state .. System.out.println(st); @@ -257,7 +257,7 @@ public class MovieSimple implements MouseListener, GLEventListener, OMXEventList public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) { GL2ES2 gl = drawable.getGL().getGL2ES2(); - st.glUseProgram(gl, true); + st.useProgram(gl, true); // Set location in front of camera pmvMatrix.glMatrixMode(pmvMatrix.GL_PROJECTION); @@ -272,10 +272,10 @@ public class MovieSimple implements MouseListener, GLEventListener, OMXEventList GLUniformData ud = st.getUniform("mgl_PMVMatrix"); if(null!=ud) { // same data object - st.glUniform(gl, ud); + st.uniform(gl, ud); } - st.glUseProgram(gl, false); + st.useProgram(gl, false); } public void dispose(GLAutoDrawable drawable) { @@ -293,7 +293,7 @@ public class MovieSimple implements MouseListener, GLEventListener, OMXEventList public void display(GLAutoDrawable drawable) { GL2ES2 gl = drawable.getGL().getGL2ES2(); - st.glUseProgram(gl, true); + st.useProgram(gl, true); gl.glClear(gl.GL_COLOR_BUFFER_BIT | gl.GL_DEPTH_BUFFER_BIT); @@ -312,7 +312,7 @@ public class MovieSimple implements MouseListener, GLEventListener, OMXEventList GLUniformData ud = st.getUniform("mgl_PMVMatrix"); if(null!=ud) { // same data object - st.glUniform(gl, ud); + st.uniform(gl, ud); } if(!rotate) { @@ -325,8 +325,8 @@ public class MovieSimple implements MouseListener, GLEventListener, OMXEventList if(null!=movie) { tex=movie.getNextTextureID(); if(null!=tex) { - tex.enable(); - tex.bind(); + tex.enable(gl); + tex.bind(gl); } } @@ -334,10 +334,10 @@ public class MovieSimple implements MouseListener, GLEventListener, OMXEventList gl.glDrawArrays(gl.GL_TRIANGLE_STRIP, 0, 4); if(null!=tex) { - tex.disable(); + tex.disable(gl); } - st.glUseProgram(gl, false); + st.useProgram(gl, false); } public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) { diff --git a/src/demos/es2/perftst/PerfModule.java b/src/demos/es2/perftst/PerfModule.java index 69b9f1a..b472039 100644 --- a/src/demos/es2/perftst/PerfModule.java +++ b/src/demos/es2/perftst/PerfModule.java @@ -47,7 +47,7 @@ public abstract class PerfModule { // Let's manage all our states using ShaderState. st.attachShaderProgram(gl, sp); - st.glUseProgram(gl, true); + st.useProgram(gl, true); } public static final void put(Buffer buffer, int type, float v) { diff --git a/src/demos/es2/perftst/PerfTextLoad.java b/src/demos/es2/perftst/PerfTextLoad.java index 30f0ad7..f603796 100755 --- a/src/demos/es2/perftst/PerfTextLoad.java +++ b/src/demos/es2/perftst/PerfTextLoad.java @@ -1,5 +1,7 @@ package demos.es2.perftst; +import com.jogamp.common.util.IOUtil; + import java.nio.*; import java.io.*; import java.net.*; @@ -36,7 +38,7 @@ public class PerfTextLoad extends PerfModule { try { for(int i=0; i<numObjs; i++) { textName = "data/"+textBaseName+"."+(i+1)+".tga"; - URL urlText = Locator.getResource(Perftst.class, textName); + URL urlText = IOUtil.getResource(Perftst.class, textName); if(urlText==null) { throw new RuntimeException("couldn't fetch "+textName); } @@ -57,9 +59,9 @@ public class PerfTextLoad extends PerfModule { // Vertices Data setup // - st.glUseProgram(gl, true); + st.useProgram(gl, true); - GLArrayDataServer vertices = GLArrayDataServer.createGLSL(gl, "mgl_Vertex", 2, GL.GL_FLOAT, true, 4, GL.GL_STATIC_DRAW); + GLArrayDataServer vertices = GLArrayDataServer.createGLSL("mgl_Vertex", 2, GL.GL_FLOAT, true, 4, GL.GL_STATIC_DRAW); { FloatBuffer vb = (FloatBuffer)vertices.getBuffer(); vb.put(0f); vb.put(0f); @@ -69,7 +71,7 @@ public class PerfTextLoad extends PerfModule { } vertices.seal(gl, true); - GLArrayDataServer texCoords = GLArrayDataServer.createGLSL(gl, "mgl_MultiTexCoord0", 2, GL.GL_FLOAT, true, 4, GL.GL_STATIC_DRAW); + GLArrayDataServer texCoords = GLArrayDataServer.createGLSL("mgl_MultiTexCoord0", 2, GL.GL_FLOAT, true, 4, GL.GL_STATIC_DRAW); { FloatBuffer cb = (FloatBuffer)texCoords.getBuffer(); cb.put(0f); cb.put(0f); @@ -86,12 +88,12 @@ public class PerfTextLoad extends PerfModule { tU[0] = System.currentTimeMillis(); for(int j=0; j<numTextures; j++) { gl.glActiveTexture(j); - textures[j].updateImage(textDatas[0]); + textures[j].updateImage(gl, textDatas[0]); tU[j+1] = System.currentTimeMillis(); } GLUniformData activeTexture = new GLUniformData("mgl_ActiveTexture", 0); - st.glUniform(gl, activeTexture); + st.uniform(gl, activeTexture); // // run loops @@ -116,18 +118,18 @@ public class PerfTextLoad extends PerfModule { for(int k=0; k<numTextures; k++) { gl.glActiveTexture(GL.GL_TEXTURE0+k); - textures[k].enable(); - textures[k].bind(); + textures[k].enable(gl); + textures[k].bind(gl); activeTexture.setData(k); - st.glUniform(gl, activeTexture); + st.uniform(gl, activeTexture); t1[i][j][k] = System.currentTimeMillis(); - textures[k].updateSubImage(textDatas[j], 0, 0, 0); + textures[k].updateSubImage(gl, textDatas[j], 0, 0, 0); t2[i][j][k] = System.currentTimeMillis(); - gl.glDrawArrays(GL.GL_TRIANGLE_STRIP, 0, vertices.getElementNumber()); + gl.glDrawArrays(GL.GL_TRIANGLE_STRIP, 0, vertices.getElementCount()); t3[i][j][k] = System.currentTimeMillis(); } @@ -189,11 +191,11 @@ public class PerfTextLoad extends PerfModule { } System.out.println("*****************************************************************"); - st.glUseProgram(gl, false); + st.useProgram(gl, false); for(int i=0; i<numTextures; i++) { - textures[i].disable(); - textures[i].dispose(); + textures[i].disable(gl); + textures[i].destroy(gl); textures[i]=null; } for(int i=0; i<numObjs; i++) { diff --git a/src/demos/es2/perftst/PerfUniLoad.java b/src/demos/es2/perftst/PerfUniLoad.java index 1c71253..92626b0 100755 --- a/src/demos/es2/perftst/PerfUniLoad.java +++ b/src/demos/es2/perftst/PerfUniLoad.java @@ -35,9 +35,9 @@ public class PerfUniLoad extends PerfModule { throw new GLException("numArrayElem must be within 0.."+MAX_ARRAY_ELEM); } - st.glUseProgram(gl, true); + st.useProgram(gl, true); - GLArrayDataServer vertices = GLArrayDataServer.createGLSL(gl, "mgl_Vertex", 3, GL.GL_FLOAT, true, 4, GL.GL_STATIC_DRAW); + GLArrayDataServer vertices = GLArrayDataServer.createGLSL("mgl_Vertex", 3, GL.GL_FLOAT, true, 4, GL.GL_STATIC_DRAW); { FloatBuffer vb = (FloatBuffer)vertices.getBuffer(); vb.put(0f); vb.put(0f); vb.put(0f); @@ -47,7 +47,7 @@ public class PerfUniLoad extends PerfModule { } vertices.seal(gl, true); - GLArrayDataServer colors = GLArrayDataServer.createGLSL(gl, "mgl_Color", 4, GL.GL_FLOAT, true, 4, GL.GL_STATIC_DRAW); + GLArrayDataServer colors = GLArrayDataServer.createGLSL("mgl_Color", 4, GL.GL_FLOAT, true, 4, GL.GL_STATIC_DRAW); { FloatBuffer cb = (FloatBuffer)colors.getBuffer(); cb.put(0f); cb.put(0f); cb.put(0f); cb.put(1f); @@ -103,11 +103,11 @@ public class PerfUniLoad extends PerfModule { t0[i] = System.currentTimeMillis(); for(int j=0; j<numObjs; j++) { - st.glUniform(gl, dummyUni[j]); + st.uniform(gl, dummyUni[j]); t1[i][j] = System.currentTimeMillis(); - gl.glDrawArrays(GL.GL_LINE_STRIP, 0, vertices.getElementNumber()); + gl.glDrawArrays(GL.GL_LINE_STRIP, 0, vertices.getElementCount()); t2[i][j] = System.currentTimeMillis(); } @@ -155,7 +155,7 @@ public class PerfUniLoad extends PerfModule { System.out.println("*****************************************************************"); - st.glUseProgram(gl, false); + st.useProgram(gl, false); try { Thread.sleep(100); diff --git a/src/demos/es2/perftst/PerfVBOLoad.java b/src/demos/es2/perftst/PerfVBOLoad.java index d0b4a1d..8e73197 100755 --- a/src/demos/es2/perftst/PerfVBOLoad.java +++ b/src/demos/es2/perftst/PerfVBOLoad.java @@ -28,8 +28,8 @@ public class PerfVBOLoad extends PerfModule { float r=1f, g=1f, b=1f; for(int i=0; i<numObjs; i++) { - vertices[i] = GLArrayDataServer.createGLSL(gl, "mgl_Vertex", 3, dataType, true, numVertices, GL.GL_STATIC_DRAW); - vertices[i].setVBOUsage(useVBO); + vertices[i] = GLArrayDataServer.createGLSL("mgl_Vertex", 3, dataType, true, numVertices, GL.GL_STATIC_DRAW); + vertices[i].setVBOEnabled(useVBO); { Buffer verticeb = vertices[i].getBuffer(); for(int j=0; j<numVertices; j++) { @@ -42,8 +42,8 @@ public class PerfVBOLoad extends PerfModule { if(y>1f) { x=0f; y=0f; z+=0.01f; } } } - colors[i] = GLArrayDataServer.createGLSL(gl, "mgl_Color", 4, dataType, true, numVertices, GL.GL_STATIC_DRAW); - colors[i].setVBOUsage(useVBO); + colors[i] = GLArrayDataServer.createGLSL("mgl_Color", 4, dataType, true, numVertices, GL.GL_STATIC_DRAW); + colors[i].setVBOEnabled(useVBO); { // Fill them up Buffer colorb = colors[i].getBuffer(); @@ -74,7 +74,7 @@ public class PerfVBOLoad extends PerfModule { long[] tS = new long[loops]; // Push the 1st uniform down the path - st.glUseProgram(gl, true); + st.useProgram(gl, true); for(int i=0; i<loops; i++) { tC[i] = System.currentTimeMillis(); @@ -103,7 +103,7 @@ public class PerfVBOLoad extends PerfModule { t2[i][j] = System.currentTimeMillis(); - gl.glDrawArrays(GL.GL_LINE_STRIP, 0, vertices[j].getElementNumber()); + gl.glDrawArrays(GL.GL_LINE_STRIP, 0, vertices[j].getElementCount()); if(numObjs>1) { vertices[j].enableBuffer(gl, false); @@ -127,10 +127,10 @@ public class PerfVBOLoad extends PerfModule { colors[0].enableBuffer(gl, false); } - int verticesElements = vertices[0].getElementNumber() * numObjs; - int verticesBytes = verticesElements * vertices[0].getComponentSize()* vertices[0].getComponentNumber(); - int colorsElements = colors[0].getElementNumber() * colors.length; - int colorsBytes = colorsElements * colors[0].getComponentSize()* colors[0].getComponentNumber(); + int verticesElements = vertices[0].getElementCount() * numObjs; + int verticesBytes = verticesElements * vertices[0].getComponentSizeInBytes()* vertices[0].getComponentCount(); + int colorsElements = colors[0].getElementCount() * colors.length; + int colorsBytes = colorsElements * colors[0].getComponentSizeInBytes()* colors[0].getComponentCount(); dt = 0; for(int i=1; i<loops; i++) { @@ -139,8 +139,8 @@ public class PerfVBOLoad extends PerfModule { System.out.println(""); System.out.println("Loops "+loops+", useVBO "+useVBO+", objects "+numObjs+", type "+getTypeName(dataType)+ - ", vertices p.o. "+vertices[0].getElementNumber()+ - ", colors p.o. "+colors[0].getElementNumber()+ + ", vertices p.o. "+vertices[0].getElementCount()+ + ", colors p.o. "+colors[0].getElementCount()+ ",\n total elements "+(verticesElements+colorsElements)+ ", total bytes "+(verticesBytes+colorsBytes)+", total time: "+dt + "ms, fps(-1): "+(((loops-1)*1000)/dt)+ @@ -164,7 +164,7 @@ public class PerfVBOLoad extends PerfModule { } System.out.println("*****************************************************************"); - st.glUseProgram(gl, false); + st.useProgram(gl, false); for(int i=0; i<numObjs; i++) { vertices[i].destroy(gl); diff --git a/src/demos/es2/perftst/Perftst.java b/src/demos/es2/perftst/Perftst.java index 4860e51..dba9e48 100755 --- a/src/demos/es2/perftst/Perftst.java +++ b/src/demos/es2/perftst/Perftst.java @@ -93,17 +93,17 @@ public class Perftst implements MouseListener, GLEventListener { pmvMatrix = new PMVMatrix(); pmod.initShaderState(gl); - st = ShaderState.getCurrent(); + st = ShaderState.getShaderState(gl); // Push the 1st uniform down the path - st.glUseProgram(gl, true); + st.useProgram(gl, true); pmvMatrix.glMatrixMode(pmvMatrix.GL_PROJECTION); pmvMatrix.glLoadIdentity(); pmvMatrix.glMatrixMode(pmvMatrix.GL_MODELVIEW); pmvMatrix.glLoadIdentity(); - if(!st.glUniform(gl, new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.glGetPMvMatrixf()))) { + if(!st.uniform(gl, new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.glGetPMvMatrixf()))) { throw new GLException("Error setting PMVMatrix in shader: "+st); } @@ -111,7 +111,7 @@ public class Perftst implements MouseListener, GLEventListener { gl.glClearColor(0, 0, 0, 1); gl.glEnable(GL2ES2.GL_DEPTH_TEST); - st.glUseProgram(gl, false); + st.useProgram(gl, false); // Let's show the completed shader state .. System.out.println(st); @@ -120,7 +120,7 @@ public class Perftst implements MouseListener, GLEventListener { public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) { GL2ES2 gl = drawable.getGL().getGL2ES2(); - st.glUseProgram(gl, true); + st.useProgram(gl, true); // Set location in front of camera pmvMatrix.glMatrixMode(pmvMatrix.GL_PROJECTION); @@ -134,10 +134,10 @@ public class Perftst implements MouseListener, GLEventListener { GLUniformData ud = st.getUniform("mgl_PMVMatrix"); if(null!=ud) { // same data object - st.glUniform(gl, ud); + st.uniform(gl, ud); } - st.glUseProgram(gl, false); + st.useProgram(gl, false); } public void dispose(GLAutoDrawable drawable) { diff --git a/src/demos/gears/Gears.java b/src/demos/gears/Gears.java index 589ef8e..4b1b7f9 100644 --- a/src/demos/gears/Gears.java +++ b/src/demos/gears/Gears.java @@ -1,34 +1,38 @@ package demos.gears; -import javax.media.opengl.*; -import javax.media.opengl.awt.*; +import javax.media.opengl.GL2; +import javax.media.opengl.GLAutoDrawable; +import javax.media.opengl.GLEventListener; +import javax.media.opengl.GLProfile; +import javax.media.opengl.awt.GLCanvas; import com.jogamp.opengl.util.Animator; -import com.jogamp.newt.event.*; -import com.jogamp.newt.event.awt.*; -import java.awt.BorderLayout; -import java.awt.Component; -import java.awt.Frame; import com.jogamp.newt.Window; +import com.jogamp.newt.event.KeyAdapter; +import com.jogamp.newt.event.KeyEvent; +import com.jogamp.newt.event.KeyListener; +import com.jogamp.newt.event.MouseAdapter; +import com.jogamp.newt.event.MouseEvent; +import com.jogamp.newt.event.MouseListener; +import com.jogamp.newt.event.awt.AWTKeyAdapter; +import com.jogamp.newt.event.awt.AWTMouseAdapter; /** * Gears.java <BR> - * author: Brian Paul (converted to Java by Ron Cemer and Sven Goethel) <P> + * author: Brian Paul (converted to Java by Ron Cemer and Sven Gothel) <P> * * This version is equal to Brian Paul's version 1.2 1999/10/21 */ public class Gears implements GLEventListener { - static { - GLProfile.initSingleton(false); - } private float view_rotx = 20.0f, view_roty = 30.0f, view_rotz = 0.0f; - private int gear1, gear2, gear3; + private int gear1=0, gear2=0, gear3=0; private float angle = 0.0f; + private int swapInterval; - private int prevMouseX, prevMouseY; private boolean mouseRButtonDown = false; + private int prevMouseX, prevMouseY; public static void main(String[] args) { // set argument 'NotFirstUIActionOnProcess' in the JNLP's application-desc tag for example @@ -37,9 +41,9 @@ public class Gears implements GLEventListener { // </application-desc> // boolean firstUIActionOnProcess = 0==args.length || !args[0].equals("NotFirstUIActionOnProcess") ; - Frame frame = new Frame("Gear Demo"); + java.awt.Frame frame = new java.awt.Frame("Gear Demo"); frame.setSize(300, 300); - frame.setLayout(new BorderLayout()); + frame.setLayout(new java.awt.BorderLayout()); final Animator animator = new Animator(); frame.addWindowListener(new java.awt.event.WindowAdapter() { @@ -64,12 +68,41 @@ public class Gears implements GLEventListener { final Gears gears = new Gears(); canvas.addGLEventListener(gears); - frame.add(canvas, BorderLayout.CENTER); + frame.add(canvas, java.awt.BorderLayout.CENTER); frame.validate(); frame.setVisible(true); animator.start(); } + + public Gears(int swapInterval) { + this.swapInterval = swapInterval; + } + + public Gears() { + this.swapInterval = 1; + } + + public void setGears(int g1, int g2, int g3) { + gear1 = g1; + gear2 = g2; + gear3 = g3; + } + + /** + * @return display list gear1 + */ + public int getGear1() { return gear1; } + + /** + * @return display list gear2 + */ + public int getGear2() { return gear2; } + + /** + * @return display list gear3 + */ + public int getGear3() { return gear3; } public void init(GLAutoDrawable drawable) { System.err.println("Gears: Init: "+drawable); @@ -84,12 +117,10 @@ public class Gears implements GLEventListener { System.err.println("GL_RENDERER: " + gl.glGetString(GL2.GL_RENDERER)); System.err.println("GL_VERSION: " + gl.glGetString(GL2.GL_VERSION)); - gl.setSwapInterval(1); - float pos[] = { 5.0f, 5.0f, 10.0f, 0.0f }; - float red[] = { 0.8f, 0.1f, 0.0f, 1.0f }; - float green[] = { 0.0f, 0.8f, 0.2f, 1.0f }; - float blue[] = { 0.2f, 0.2f, 1.0f, 1.0f }; + float red[] = { 0.8f, 0.1f, 0.0f, 0.7f }; + float green[] = { 0.0f, 0.8f, 0.2f, 0.7f }; + float blue[] = { 0.2f, 0.2f, 1.0f, 0.7f }; gl.glLightfv(GL2.GL_LIGHT0, GL2.GL_POSITION, pos, 0); gl.glEnable(GL2.GL_CULL_FACE); @@ -98,42 +129,62 @@ public class Gears implements GLEventListener { gl.glEnable(GL2.GL_DEPTH_TEST); /* make the gears */ - gear1 = gl.glGenLists(1); - gl.glNewList(gear1, GL2.GL_COMPILE); - gl.glMaterialfv(GL2.GL_FRONT, GL2.GL_AMBIENT_AND_DIFFUSE, red, 0); - gear(gl, 1.0f, 4.0f, 1.0f, 20, 0.7f); - gl.glEndList(); + if(0>=gear1) { + gear1 = gl.glGenLists(1); + gl.glNewList(gear1, GL2.GL_COMPILE); + gl.glMaterialfv(GL2.GL_FRONT, GL2.GL_AMBIENT_AND_DIFFUSE, red, 0); + gear(gl, 1.0f, 4.0f, 1.0f, 20, 0.7f); + gl.glEndList(); + System.err.println("gear1 list created: "+gear1); + } else { + System.err.println("gear1 list reused: "+gear1); + } - gear2 = gl.glGenLists(1); - gl.glNewList(gear2, GL2.GL_COMPILE); - gl.glMaterialfv(GL2.GL_FRONT, GL2.GL_AMBIENT_AND_DIFFUSE, green, 0); - gear(gl, 0.5f, 2.0f, 2.0f, 10, 0.7f); - gl.glEndList(); + if(0>=gear2) { + gear2 = gl.glGenLists(1); + gl.glNewList(gear2, GL2.GL_COMPILE); + gl.glMaterialfv(GL2.GL_FRONT, GL2.GL_AMBIENT_AND_DIFFUSE, green, 0); + gear(gl, 0.5f, 2.0f, 2.0f, 10, 0.7f); + gl.glEndList(); + System.err.println("gear2 list created: "+gear2); + } else { + System.err.println("gear2 list reused: "+gear2); + } - gear3 = gl.glGenLists(1); - gl.glNewList(gear3, GL2.GL_COMPILE); - gl.glMaterialfv(GL2.GL_FRONT, GL2.GL_AMBIENT_AND_DIFFUSE, blue, 0); - gear(gl, 1.3f, 2.0f, 0.5f, 10, 0.7f); - gl.glEndList(); + if(0>=gear3) { + gear3 = gl.glGenLists(1); + gl.glNewList(gear3, GL2.GL_COMPILE); + gl.glMaterialfv(GL2.GL_FRONT, GL2.GL_AMBIENT_AND_DIFFUSE, blue, 0); + gear(gl, 1.3f, 2.0f, 0.5f, 10, 0.7f); + gl.glEndList(); + System.err.println("gear3 list created: "+gear3); + } else { + System.err.println("gear3 list reused: "+gear3); + } gl.glEnable(GL2.GL_NORMALIZE); // MouseListener gearsMouse = new TraceMouseAdapter(new GearsMouseAdapter()); - MouseListener gearsMouse = new GearsMouseAdapter(); + MouseListener gearsMouse = new GearsMouseAdapter(); + KeyListener gearsKeys = new GearsKeyAdapter(); - if (drawable instanceof Component) { - Component comp = (Component) drawable; - new AWTMouseAdapter(gearsMouse).addTo(comp); - } else if (drawable instanceof Window) { + if (drawable instanceof Window) { Window window = (Window) drawable; window.addMouseListener(gearsMouse); + window.addKeyListener(gearsKeys); + } else if (GLProfile.isAWTAvailable() && drawable instanceof java.awt.Component) { + java.awt.Component comp = (java.awt.Component) drawable; + new AWTMouseAdapter(gearsMouse).addTo(comp); + new AWTKeyAdapter(gearsKeys).addTo(comp); } } public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) { - System.err.println("Gears: Reshape: "+x+"/"+y+" "+width+"x"+height); + System.err.println("Gears: Reshape "+x+"/"+y+" "+width+"x"+height); GL2 gl = drawable.getGL().getGL2(); + gl.setSwapInterval(swapInterval); + float h = (float)height / (float)width; gl.glMatrixMode(GL2.GL_PROJECTION); @@ -147,6 +198,7 @@ public class Gears implements GLEventListener { public void dispose(GLAutoDrawable drawable) { System.err.println("Gears: Dispose"); + setGears(0, 0, 0); } public void display(GLAutoDrawable drawable) { @@ -156,11 +208,14 @@ public class Gears implements GLEventListener { // Get the GL corresponding to the drawable we are animating GL2 gl = drawable.getGL().getGL2(); + gl.glClearColor(0.0f, 0.0f, 0.0f, 0.0f); + // Special handling for the case where the GLJPanel is translucent // and wants to be composited with other Java 2D content - if ((drawable instanceof GLJPanel) && - !((GLJPanel) drawable).isOpaque() && - ((GLJPanel) drawable).shouldPreserveColorBufferIfTranslucent()) { + if (GLProfile.isAWTAvailable() && + (drawable instanceof javax.media.opengl.awt.GLJPanel) && + !((javax.media.opengl.awt.GLJPanel) drawable).isOpaque() && + ((javax.media.opengl.awt.GLJPanel) drawable).shouldPreserveColorBufferIfTranslucent()) { gl.glClear(GL2.GL_DEPTH_BUFFER_BIT); } else { gl.glClear(GL2.GL_COLOR_BUFFER_BIT | GL2.GL_DEPTH_BUFFER_BIT); @@ -315,6 +370,21 @@ public class Gears implements GLEventListener { gl.glEnd(); } + class GearsKeyAdapter extends KeyAdapter { + public void keyPressed(KeyEvent e) { + int kc = e.getKeyCode(); + if(KeyEvent.VK_LEFT == kc) { + view_roty -= 1; + } else if(KeyEvent.VK_RIGHT == kc) { + view_roty += 1; + } else if(KeyEvent.VK_UP == kc) { + view_rotx -= 1; + } else if(KeyEvent.VK_DOWN == kc) { + view_rotx += 1; + } + } + } + class GearsMouseAdapter extends MouseAdapter { public void mousePressed(MouseEvent e) { prevMouseX = e.getX(); @@ -339,8 +409,8 @@ public class Gears implements GLEventListener { Window window = (Window) source; width=window.getWidth(); height=window.getHeight(); - } else if (source instanceof Component) { - Component comp = (Component) source; + } else if (GLProfile.isAWTAvailable() && source instanceof java.awt.Component) { + java.awt.Component comp = (java.awt.Component) source; width=comp.getWidth(); height=comp.getHeight(); } else { diff --git a/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java b/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java index 7afb354..e2af4b3 100644 --- a/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java +++ b/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java @@ -240,8 +240,8 @@ public class HWShadowmapsSimple extends Demo { decal = TextureIO.newTexture(getClass().getClassLoader().getResourceAsStream("demos/data/images/decal_image.png"), true, TextureIO.PNG); - decal.setTexParameteri(GL2.GL_TEXTURE_WRAP_S, GL2.GL_REPEAT); - decal.setTexParameteri(GL2.GL_TEXTURE_WRAP_T, GL2.GL_REPEAT); + decal.setTexParameteri(gl, GL2.GL_TEXTURE_WRAP_S, GL2.GL_REPEAT); + decal.setTexParameteri(gl, GL2.GL_TEXTURE_WRAP_T, GL2.GL_REPEAT); light_image = TextureIO.newTexture(getClass().getClassLoader().getResourceAsStream("demos/data/images/nvlogo_spot.png"), true, TextureIO.PNG); @@ -573,10 +573,10 @@ public class HWShadowmapsSimple extends Demo { gl.glMatrixMode(GL2.GL_MODELVIEW); gl.glDisable(GL2.GL_LIGHTING); - decal.bind(); - decal.enable(); + decal.bind(gl); + decal.enable(gl); gl.glCallList(quad); - decal.disable(); + decal.disable(gl); gl.glEnable(GL2.GL_LIGHTING); texgen(gl, false); @@ -647,8 +647,8 @@ public class HWShadowmapsSimple extends Demo { applyTransform(gl, spotlightInverseTransform); gl.glMatrixMode(GL2.GL_MODELVIEW); - light_image.bind(); - light_image.enable(); + light_image.bind(gl); + light_image.enable(gl); gl.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_TEXTURE_ENV_MODE, GL2.GL_MODULATE); gl.glActiveTexture(GL2.GL_TEXTURE0); @@ -660,7 +660,7 @@ public class HWShadowmapsSimple extends Demo { render_scene(gl, cameraTransform, drawable, params); gl.glActiveTexture(GL2.GL_TEXTURE1); - light_image.disable(); + light_image.disable(gl); gl.glActiveTexture(GL2.GL_TEXTURE0); render_manipulators(gl, cameraTransform, drawable, params); @@ -694,8 +694,8 @@ public class HWShadowmapsSimple extends Demo { applyTransform(gl, spotlightInverseTransform); gl.glMatrixMode(GL2.GL_MODELVIEW); - light_image.bind(); - light_image.enable(); + light_image.bind(gl); + light_image.enable(gl); gl.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_TEXTURE_ENV_MODE, GL2.GL_MODULATE); // depth compare @@ -729,7 +729,7 @@ public class HWShadowmapsSimple extends Demo { render_scene(gl, cameraTransform, drawable, params); gl.glActiveTexture(GL2.GL_TEXTURE1); - light_image.disable(); + light_image.disable(gl); gl.glActiveTexture(GL2.GL_TEXTURE2); gl.glDisable(GL2.GL_TEXTURE_2D); gl.glActiveTexture(GL2.GL_TEXTURE0); @@ -769,8 +769,8 @@ public class HWShadowmapsSimple extends Demo { glu.gluPerspective(lightshaper_fovy, 1, lightshaper_zNear, lightshaper_zFar); gl.glMatrixMode(GL2.GL_MODELVIEW); - light_image.bind(); - light_image.enable(); + light_image.bind(gl); + light_image.enable(gl); gl.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_TEXTURE_ENV_MODE, GL2.GL_MODULATE); gl.glActiveTexture(GL2.GL_TEXTURE0); @@ -785,7 +785,7 @@ public class HWShadowmapsSimple extends Demo { render_scene(gl, spotlightTransform, null, null); gl.glActiveTexture(GL2.GL_TEXTURE1); - light_image.disable(); + light_image.disable(gl); gl.glActiveTexture(GL2.GL_TEXTURE0); } diff --git a/src/demos/j2d/CustomText.java b/src/demos/j2d/CustomText.java index 5918dc9..3a68761 100755 --- a/src/demos/j2d/CustomText.java +++ b/src/demos/j2d/CustomText.java @@ -210,11 +210,11 @@ public class CustomText extends Demo { g.fillRect(1, 1, 1, 1); g.dispose(); backgroundTexture = AWTTextureIO.newTexture(gl.getGLProfile(), bgImage, false); - backgroundTexture.bind(); - backgroundTexture.setTexParameteri(GL.GL_TEXTURE_MIN_FILTER, GL.GL_NEAREST); - backgroundTexture.setTexParameteri(GL.GL_TEXTURE_MAG_FILTER, GL.GL_NEAREST); - backgroundTexture.setTexParameteri(GL.GL_TEXTURE_WRAP_S, GL.GL_REPEAT); - backgroundTexture.setTexParameteri(GL.GL_TEXTURE_WRAP_T, GL.GL_REPEAT); + backgroundTexture.bind(gl); + backgroundTexture.setTexParameteri(gl, GL.GL_TEXTURE_MIN_FILTER, GL.GL_NEAREST); + backgroundTexture.setTexParameteri(gl, GL.GL_TEXTURE_MAG_FILTER, GL.GL_NEAREST); + backgroundTexture.setTexParameteri(gl, GL.GL_TEXTURE_WRAP_S, GL.GL_REPEAT); + backgroundTexture.setTexParameteri(gl, GL.GL_TEXTURE_WRAP_T, GL.GL_REPEAT); // Create the text renderer renderer = new TextRenderer(new Font("Serif", Font.PLAIN, 72), true, true, @@ -299,8 +299,8 @@ public class CustomText extends Demo { gl.glLoadIdentity(); // Draw the background texture - backgroundTexture.enable(); - backgroundTexture.bind(); + backgroundTexture.enable(gl); + backgroundTexture.bind(gl); TextureCoords coords = backgroundTexture.getImageTexCoords(); int w = drawable.getWidth(); int h = drawable.getHeight(); @@ -317,7 +317,7 @@ public class CustomText extends Demo { gl.glTexCoord2f(fw * coords.left(), fh * coords.top()); gl.glVertex3f(0, h, 0); gl.glEnd(); - backgroundTexture.disable(); + backgroundTexture.disable(gl); // Render all text renderer.beginRendering(drawable.getWidth(), drawable.getHeight()); diff --git a/src/demos/j2d/FlyingText.java b/src/demos/j2d/FlyingText.java index 929803e..debb9c7 100755 --- a/src/demos/j2d/FlyingText.java +++ b/src/demos/j2d/FlyingText.java @@ -249,11 +249,11 @@ public class FlyingText extends Demo { g.fillRect(1, 1, 1, 1); g.dispose(); backgroundTexture = AWTTextureIO.newTexture(gl.getGLProfile(), bgImage, false); - backgroundTexture.bind(); - backgroundTexture.setTexParameteri(GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_NEAREST); - backgroundTexture.setTexParameteri(GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_NEAREST); - backgroundTexture.setTexParameteri(GL2.GL_TEXTURE_WRAP_S, GL2.GL_REPEAT); - backgroundTexture.setTexParameteri(GL2.GL_TEXTURE_WRAP_T, GL2.GL_REPEAT); + backgroundTexture.bind(gl); + backgroundTexture.setTexParameteri(gl, GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_NEAREST); + backgroundTexture.setTexParameteri(gl, GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_NEAREST); + backgroundTexture.setTexParameteri(gl, GL2.GL_TEXTURE_WRAP_S, GL2.GL_REPEAT); + backgroundTexture.setTexParameteri(gl, GL2.GL_TEXTURE_WRAP_T, GL2.GL_REPEAT); // Create the text renderer renderer = new TextRenderer(new Font("Serif", Font.PLAIN, 72), true, true); @@ -353,8 +353,8 @@ public class FlyingText extends Demo { gl.glLoadIdentity(); // Draw the background texture - backgroundTexture.enable(); - backgroundTexture.bind(); + backgroundTexture.enable(gl); + backgroundTexture.bind(gl); TextureCoords coords = backgroundTexture.getImageTexCoords(); int w = drawable.getWidth(); int h = drawable.getHeight(); @@ -371,7 +371,7 @@ public class FlyingText extends Demo { gl.glTexCoord2f(fw * coords.left(), fh * coords.top()); gl.glVertex3f(0, h, 0); gl.glEnd(); - backgroundTexture.disable(); + backgroundTexture.disable(gl); // Render all text renderer.beginRendering(drawable.getWidth(), drawable.getHeight()); diff --git a/src/demos/misc/TiledRendering.java b/src/demos/misc/TiledRendering.java index e814610..86de0bb 100755 --- a/src/demos/misc/TiledRendering.java +++ b/src/demos/misc/TiledRendering.java @@ -1,6 +1,6 @@ package demos.misc; -import com.jogamp.opengl.util.FileUtil; +import com.jogamp.common.util.IOUtil; import com.jogamp.opengl.util.TGAWriter; import com.jogamp.opengl.util.awt.ImageUtil; import com.jogamp.opengl.util.gl2.TileRenderer; @@ -106,7 +106,7 @@ public class TiledRendering { tga.close(); } else { ImageUtil.flipImageVertically(img); - if (!ImageIO.write(img, FileUtil.getFileSuffix(file), file)) { + if (!ImageIO.write(img, IOUtil.getFileSuffix(file), file)) { System.err.println("Error writing file using ImageIO (unsupported file format?)"); } } diff --git a/src/demos/particles/engine/Engine.java b/src/demos/particles/engine/Engine.java index d769457..d443ac2 100755 --- a/src/demos/particles/engine/Engine.java +++ b/src/demos/particles/engine/Engine.java @@ -37,6 +37,7 @@ package demos.particles.engine; import javax.media.opengl.*; + import com.jogamp.opengl.util.texture.*; import java.net.*; import java.util.*; @@ -78,12 +79,12 @@ public class Engine { } } - public void init() { + public void init(GL gl) { try { ClassLoader c1 = this.getClass().getClassLoader(); URL url = c1.getResource(path); texture = TextureIO.newTexture(url, false, null); - texture.enable(); + texture.enable(gl); } catch(IOException e) { e.printStackTrace(); diff --git a/src/demos/particles/engine/GLComponent.java b/src/demos/particles/engine/GLComponent.java index 7194861..46a0940 100755 --- a/src/demos/particles/engine/GLComponent.java +++ b/src/demos/particles/engine/GLComponent.java @@ -106,7 +106,7 @@ public class GLComponent extends GLCanvas implements GLEventListener { animator.start(); - engine.init(); + engine.init(gl); } diff --git a/src/demos/particles/engine/Particle.java b/src/demos/particles/engine/Particle.java index d9858dd..81fbe25 100755 --- a/src/demos/particles/engine/Particle.java +++ b/src/demos/particles/engine/Particle.java @@ -58,7 +58,7 @@ public class Particle { public void draw(GL2 gl, Texture texture, RGBA tendToColor) { adjust(tendToColor); - texture.bind(); + texture.bind(gl); gl.glColor4f(rgba.r,rgba.g,rgba.b,rgba.a); gl.glBegin(GL2.GL_QUADS); diff --git a/src/demos/proceduralTexturePhysics/Water.java b/src/demos/proceduralTexturePhysics/Water.java index 3e4fad4..d62379b 100644 --- a/src/demos/proceduralTexturePhysics/Water.java +++ b/src/demos/proceduralTexturePhysics/Water.java @@ -33,7 +33,7 @@ package demos.proceduralTexturePhysics; -import com.jogamp.opengl.util.FileUtil; +import com.jogamp.common.util.IOUtil; import com.jogamp.opengl.util.texture.Texture; import com.jogamp.opengl.util.texture.TextureData; import com.jogamp.opengl.util.texture.TextureIO; @@ -272,11 +272,11 @@ public class Water { // Draw quad over full display gl.glActiveTexture(GL2.GL_TEXTURE0); - dynamicTextures[CA_TEXTURE_NORMAL_MAP].bind(); - dynamicTextures[CA_TEXTURE_NORMAL_MAP].disable(); + dynamicTextures[CA_TEXTURE_NORMAL_MAP].bind(gl); + dynamicTextures[CA_TEXTURE_NORMAL_MAP].disable(gl); gl.glActiveTexture(GL2.GL_TEXTURE3); - cubemap.bind(); - cubemap.enable(); + cubemap.bind(gl); + cubemap.enable(gl); gl.glColor4f(1, 1, 1, 1); gl.glBegin(GL2.GL_QUADS); @@ -307,7 +307,7 @@ public class Water { gl.glEnd(); - cubemap.disable(); + cubemap.disable(gl); gl.glDisable(GL2.GL_FRAGMENT_PROGRAM_ARB); break; @@ -316,7 +316,7 @@ public class Water { case CA_FULLSCREEN_NORMALMAP: { // Draw quad over full display gl.glActiveTexture(GL2.GL_TEXTURE0); - dynamicTextures[CA_TEXTURE_NORMAL_MAP].bind(); + dynamicTextures[CA_TEXTURE_NORMAL_MAP].bind(gl); gl.glCallList(displayListIDs[CA_DRAW_SCREEN_QUAD]); break; @@ -334,7 +334,7 @@ public class Water { case CA_FULLSCREEN_FORCE: { // Draw quad over full display gl.glActiveTexture(GL2.GL_TEXTURE0); - dynamicTextures[CA_TEXTURE_FORCE_TARGET].bind(); + dynamicTextures[CA_TEXTURE_FORCE_TARGET].bind(gl); gl.glCallList(displayListIDs[CA_DRAW_SCREEN_QUAD]); break; @@ -344,7 +344,7 @@ public class Water { // Draw quad over full display // lower left gl.glActiveTexture(GL2.GL_TEXTURE0); - dynamicTextures[CA_TEXTURE_FORCE_TARGET].bind(); + dynamicTextures[CA_TEXTURE_FORCE_TARGET].bind(gl); gl.glMatrixMode(GL2.GL_MODELVIEW); gl.glPushMatrix(); @@ -363,7 +363,7 @@ public class Water { gl.glPopMatrix(); // upper left - dynamicTextures[CA_TEXTURE_NORMAL_MAP].bind(); + dynamicTextures[CA_TEXTURE_NORMAL_MAP].bind(gl); gl.glMatrixMode(GL2.GL_MODELVIEW); gl.glPushMatrix(); @@ -498,7 +498,7 @@ public class Water { initialMapData = TextureIO.newTextureData(glp, getClass().getClassLoader().getResourceAsStream(initialMapFilename), false, - FileUtil.getFileSuffix(initialMapFilename)); + IOUtil.getFileSuffix(initialMapFilename)); } catch (IOException e) { throw new GLException(e); } @@ -694,11 +694,11 @@ public class Water { switch (flipState) { case 0: - texHeightInput = dynamicTextures[CA_TEXTURE_HEIGHT_SOURCE].getTextureObject(); // initial height map. - texHeightOutput = dynamicTextures[CA_TEXTURE_HEIGHT_TARGET].getTextureObject(); // next height map. + texHeightInput = dynamicTextures[CA_TEXTURE_HEIGHT_SOURCE].getTextureObject(gl); // initial height map. + texHeightOutput = dynamicTextures[CA_TEXTURE_HEIGHT_TARGET].getTextureObject(gl); // next height map. - texVelocityInput = dynamicTextures[CA_TEXTURE_VELOCITY_SOURCE].getTextureObject(); // initial velocity. - texVelocityOutput = dynamicTextures[CA_TEXTURE_VELOCITY_TARGET].getTextureObject(); // next velocity. + texVelocityInput = dynamicTextures[CA_TEXTURE_VELOCITY_SOURCE].getTextureObject(gl); // initial velocity. + texVelocityOutput = dynamicTextures[CA_TEXTURE_VELOCITY_TARGET].getTextureObject(gl); // next velocity. // Clear initial velocity texture to 0x80 == gray gl.glClearColor(0.5f, 0.5f, 0.5f, 1.0f); @@ -776,7 +776,7 @@ public class Water { // Now we need to copy the resulting pixels into the intermediate force field texture gl.glActiveTexture(GL2.GL_TEXTURE2); - dynamicTextures[CA_TEXTURE_FORCE_INTERMEDIATE].bind(); + dynamicTextures[CA_TEXTURE_FORCE_INTERMEDIATE].bind(gl); // use CopyTexSubImage for speed (even though we copy all of it) since we pre-allocated the texture gl.glCopyTexSubImage2D(GL2.GL_TEXTURE_2D, 0, 0, 0, 0, 0, initialMapDimensions[0], initialMapDimensions[1]); @@ -818,7 +818,7 @@ public class Water { // Now we need to copy the resulting pixels into the intermediate force field texture gl.glActiveTexture(GL2.GL_TEXTURE1); - dynamicTextures[CA_TEXTURE_FORCE_TARGET].bind(); + dynamicTextures[CA_TEXTURE_FORCE_TARGET].bind(gl); // use CopyTexSubImage for speed (even though we copy all of it) since we pre-allocated the texture gl.glCopyTexSubImage2D(GL2.GL_TEXTURE_2D, 0, 0, 0, 0, 0, initialMapDimensions[0], initialMapDimensions[1]); @@ -837,7 +837,7 @@ public class Water { gl.glActiveTexture(GL2.GL_TEXTURE0); gl.glBindTexture(GL2.GL_TEXTURE_2D, texVelocityInput); gl.glActiveTexture(GL2.GL_TEXTURE1); - dynamicTextures[CA_TEXTURE_FORCE_TARGET].bind(); + dynamicTextures[CA_TEXTURE_FORCE_TARGET].bind(gl); gl.glActiveTexture(GL2.GL_TEXTURE2); gl.glDisable(GL2.GL_TEXTURE_2D); gl.glActiveTexture(GL2.GL_TEXTURE3); @@ -985,7 +985,7 @@ public class Water { // Now we need to copy the resulting pixels into the normal map gl.glActiveTexture(GL2.GL_TEXTURE0); - dynamicTextures[CA_TEXTURE_NORMAL_MAP].bind(); + dynamicTextures[CA_TEXTURE_NORMAL_MAP].bind(gl); // use CopyTexSubImage for speed (even though we copy all of it) since we pre-allocated the texture gl.glCopyTexSubImage2D(GL2.GL_TEXTURE_2D, 0, 0, 0, 0, 0, initialMapDimensions[0], initialMapDimensions[1]); @@ -994,8 +994,8 @@ public class Water { private void drawInteriorBoundaryObjects(GL2 gl) { gl.glActiveTexture(GL2.GL_TEXTURE0); - initialMapTex.bind(); - initialMapTex.enable(); + initialMapTex.bind(gl); + initialMapTex.enable(gl); gl.glEnable(GL2.GL_ALPHA_TEST); @@ -1012,7 +1012,7 @@ public class Water { if (spinLogo) { gl.glActiveTexture(GL2.GL_TEXTURE0); - spinTex.bind(); + spinTex.bind(gl); gl.glMatrixMode(GL2.GL_MODELVIEW); gl.glPushMatrix(); gl.glRotatef(angle, 0, 0, 1); @@ -1038,15 +1038,15 @@ public class Water { initialMapTex = TextureIO.newTexture(initialMapData); spinTex = TextureIO.newTexture(getClass().getClassLoader().getResourceAsStream(spinFilename), false, - FileUtil.getFileSuffix(spinFilename)); + IOUtil.getFileSuffix(spinFilename)); dropletTex = TextureIO.newTexture(getClass().getClassLoader().getResourceAsStream(dropletFilename), false, - FileUtil.getFileSuffix(dropletFilename)); + IOUtil.getFileSuffix(dropletFilename)); // load the cubemap texture - cubemap = Cubemap.loadFromStreams(getClass().getClassLoader(), + cubemap = Cubemap.loadFromStreams(gl, + getClass().getClassLoader(), cubeMapFilenamePrefix, - cubeMapFilenameSuffix, - true); + cubeMapFilenameSuffix, true); // now create dummy intermediate textures from the initial map texture for (int i = 0; i < CA_NUM_DYNAMIC_TEXTURES; i++) { @@ -1055,11 +1055,11 @@ public class Water { initialMapData = null; - texHeightInput = initialMapTex.getTextureObject(); // initial height map. - texHeightOutput = dynamicTextures[CA_TEXTURE_HEIGHT_TARGET].getTextureObject(); // next height map. + texHeightInput = initialMapTex.getTextureObject(gl); // initial height map. + texHeightOutput = dynamicTextures[CA_TEXTURE_HEIGHT_TARGET].getTextureObject(gl); // next height map. - texVelocityInput = dynamicTextures[CA_TEXTURE_VELOCITY_SOURCE].getTextureObject(); // initial velocity. - texVelocityOutput = dynamicTextures[CA_TEXTURE_VELOCITY_TARGET].getTextureObject(); // next velocity. + texVelocityInput = dynamicTextures[CA_TEXTURE_VELOCITY_SOURCE].getTextureObject(gl); // initial velocity. + texVelocityOutput = dynamicTextures[CA_TEXTURE_VELOCITY_TARGET].getTextureObject(gl); // next velocity. } private void createAndWriteUVOffsets(GL2 gl, int width, int height) { @@ -1154,8 +1154,8 @@ public class Water { gl.glDisable(GL2.GL_VERTEX_PROGRAM_ARB); gl.glActiveTexture(GL2.GL_TEXTURE0); - dropletTex.bind(); - dropletTex.enable(); + dropletTex.bind(gl); + dropletTex.enable(gl); gl.glActiveTexture(GL2.GL_TEXTURE1); gl.glDisable(GL2.GL_TEXTURE_2D); diff --git a/src/demos/readbuffer/Main.java b/src/demos/readbuffer/Main.java index 426bdd7..d0ce55b 100755 --- a/src/demos/readbuffer/Main.java +++ b/src/demos/readbuffer/Main.java @@ -68,7 +68,7 @@ public class Main implements WindowListener, MouseListener, SurfaceUpdatedListen Window nWindow = NewtFactory.createWindow(nScreen, capsOffscreen); GLWindow windowOffscreen = GLWindow.create(nWindow); - windowOffscreen.enablePerfLog(true); + windowOffscreen.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err); windowOffscreen.setSize(w, h); windowOffscreen.setVisible(true); return windowOffscreen; @@ -139,11 +139,11 @@ public class Main implements WindowListener, MouseListener, SurfaceUpdatedListen // System.out.println("..............................."); windowOffscreen.display(); if ( TEST_READBUFFER2SCREEN == typeTest ) { - if ( windowOffscreen.getDuration() >= 10000) { + if ( windowOffscreen.getTotalFPSDuration() >= 10000) { break; } } else { - if ( windowOffscreen.getTotalFrames() >= 10) { + if ( windowOffscreen.getTotalFPSFrames() >= 10) { break; } } diff --git a/src/demos/readbuffer/ReadBuffer2Screen.java b/src/demos/readbuffer/ReadBuffer2Screen.java index 13e6508..fd7f5b5 100755 --- a/src/demos/readbuffer/ReadBuffer2Screen.java +++ b/src/demos/readbuffer/ReadBuffer2Screen.java @@ -64,12 +64,12 @@ public class ReadBuffer2Screen extends ReadBufferBase { float f_edge = 1f; if(null==readTextureVertices) { - //readTextureVertices = GLArrayDataClient.createFixed(gl, GLPointerFunc.GL_VERTEX_ARRAY, "mgl_Vertex", + //readTextureVertices = GLArrayDataClient.createFixed(gl, GLPointerFunc.GL_VERTEX_ARRAY, // 2, GL.GL_FLOAT, true, 4); - readTextureVertices = GLArrayDataServer.createFixed(gl, GLPointerFunc.GL_VERTEX_ARRAY, "mgl_Vertex", + readTextureVertices = GLArrayDataServer.createFixed(GLPointerFunc.GL_VERTEX_ARRAY, 2, GL.GL_FLOAT, true, 4, GL.GL_STATIC_DRAW); readTextureVertices.setEnableAlways(enableBufferAlways); - readTextureVertices.setVBOUsage(enableBufferVBO); + readTextureVertices.setVBOEnabled(enableBufferVBO); { FloatBuffer vb = (FloatBuffer)readTextureVertices.getBuffer(); vb.put(-f_edge); vb.put(-f_edge); @@ -130,8 +130,8 @@ public class ReadBuffer2Screen extends ReadBufferBase { if(!readBufferUtil.isValid()) return; // Now draw one quad with the texture - readBufferUtil.getTexture().enable(); - readBufferUtil.getTexture().bind(); + readBufferUtil.getTexture().enable(gl); + readBufferUtil.getTexture().bind(gl); if(gl.isGL2ES1()) { // gl.getGL2ES1().glTexEnvi(GL2ES1.GL_TEXTURE_ENV, GL2ES1.GL_TEXTURE_ENV_MODE, GL2ES1.GL_REPLACE); @@ -144,22 +144,22 @@ public class ReadBuffer2Screen extends ReadBufferBase { if(null!=readTextureCoords) { readTextureCoords.enableBuffer(gl, true); } - gl.glDrawArrays(GL.GL_TRIANGLE_STRIP, 0, readTextureVertices.getElementNumber()); + gl.glDrawArrays(GL.GL_TRIANGLE_STRIP, 0, readTextureVertices.getElementCount()); /** if(null!=readTextureCoords) { readTextureCoords.enableBuffer(gl, false); } readTextureVertices.enableBuffer(gl, false); */ - readBufferUtil.getTexture().disable(); + readBufferUtil.getTexture().disable(gl); } void updateTextureCoords(GL gl, boolean force) { if(force || null==readTextureCoords) { - readTextureCoords = GLArrayDataServer.createFixed(gl, GLPointerFunc.GL_TEXTURE_COORD_ARRAY, "mgl_MultiTexCoord0", + readTextureCoords = GLArrayDataServer.createFixed(GLPointerFunc.GL_TEXTURE_COORD_ARRAY, 2, GL.GL_FLOAT, true, 4, GL.GL_STATIC_DRAW); readTextureCoords.setEnableAlways(enableBufferAlways); - readTextureCoords.setVBOUsage(enableBufferVBO); + readTextureCoords.setVBOEnabled(enableBufferVBO); { TextureCoords coords = readBufferUtil.getTexture().getImageTexCoords(); FloatBuffer cb = (FloatBuffer)readTextureCoords.getBuffer(); diff --git a/src/demos/readbuffer/ReadBufferBase.java b/src/demos/readbuffer/ReadBufferBase.java index 6922f02..d392d1c 100755 --- a/src/demos/readbuffer/ReadBufferBase.java +++ b/src/demos/readbuffer/ReadBufferBase.java @@ -80,7 +80,7 @@ public class ReadBufferBase implements GLEventListener { } public void dispose(GLAutoDrawable drawable) { - readBufferUtil.dispose(); + readBufferUtil.dispose(drawable.getGL()); } public void display(GLAutoDrawable drawable) { diff --git a/src/demos/readbuffer/ReadBufferUtil.java b/src/demos/readbuffer/ReadBufferUtil.java index 85680c7..e271767 100755 --- a/src/demos/readbuffer/ReadBufferUtil.java +++ b/src/demos/readbuffer/ReadBufferUtil.java @@ -88,9 +88,9 @@ public class ReadBufferUtil { gl.glReadPixels(0, 0, drawable.getWidth(), drawable.getHeight(), GL.GL_RGB, GL.GL_UNSIGNED_BYTE, readPixelBuffer); readPixelBuffer.rewind(); if(newData) { - readTexture.updateImage(readTextureData); + readTexture.updateImage(gl, readTextureData); } else { - readTexture.updateSubImage(readTextureData, 0, + readTexture.updateSubImage(gl, readTextureData, 0, 0, 0, // src offset 0, 0, // dst offset drawable.getWidth(), drawable.getHeight()); @@ -99,8 +99,8 @@ public class ReadBufferUtil { } } - public void dispose() { - readTexture.dispose(); + public void dispose(GL gl) { + readTexture.destroy(gl); readTextureData = null; readPixelBuffer.clear(); readPixelBuffer = null; diff --git a/src/demos/readbuffer/Surface2File.java b/src/demos/readbuffer/Surface2File.java index 2303a1c..051094c 100755 --- a/src/demos/readbuffer/Surface2File.java +++ b/src/demos/readbuffer/Surface2File.java @@ -47,8 +47,8 @@ public class Surface2File implements SurfaceUpdatedListener { ReadBufferUtil readBufferUtil = new ReadBufferUtil(); int shotNum=0; - public void dispose() { - readBufferUtil.dispose(); + public void dispose(GL gl) { + readBufferUtil.dispose(gl); } public void surfaceUpdated(Object updater, NativeSurface surface, long when) { diff --git a/src/demos/tennis/Tennis.java b/src/demos/tennis/Tennis.java new file mode 100644 index 0000000..2460f90 --- /dev/null +++ b/src/demos/tennis/Tennis.java @@ -0,0 +1,920 @@ +package demos.tennis;
+
+import javax.media.opengl.GL2;
+import javax.media.opengl.GLAutoDrawable;
+import javax.media.opengl.GLEventListener;
+import javax.media.opengl.GLException;
+import javax.media.opengl.GLProfile;
+import javax.media.opengl.awt.GLCanvas;
+import com.jogamp.opengl.util.Animator;
+import com.jogamp.opengl.util.texture.Texture;
+import com.jogamp.opengl.util.texture.TextureCoords;
+import com.jogamp.opengl.util.texture.TextureIO;
+
+import javax.media.opengl.GL;
+//import javax.media.opengl.glu.GLU;
+import javax.swing.JOptionPane;
+
+//import java.io.BufferedReader;
+import java.io.ByteArrayOutputStream;
+//import java.io.File;
+import java.io.IOException;
+import java.io.PrintStream;
+
+import com.jogamp.newt.Window;
+//import com.jogamp.newt.event.InputEvent;
+import com.jogamp.newt.event.KeyAdapter;
+import com.jogamp.newt.event.KeyEvent;
+import com.jogamp.newt.event.KeyListener;
+import com.jogamp.newt.event.MouseAdapter;
+import com.jogamp.newt.event.MouseEvent;
+import com.jogamp.newt.event.MouseListener;
+import com.jogamp.newt.event.awt.AWTKeyAdapter;
+import com.jogamp.newt.event.awt.AWTMouseAdapter;
+
+import java.awt.AWTException;
+import java.awt.Cursor;
+import java.awt.Image;
+import java.awt.MouseInfo;
+import java.awt.Point;
+import java.awt.Robot;
+import java.awt.Toolkit;
+import java.awt.image.BufferedImage;
+//import java.io.ByteArrayOutputStream;
+//import java.io.IOException;
+//import java.io.PrintStream;
+
+/**
+ * Tennis.java <BR>
+ * author: Fofonov Alexey <P>
+ */
+
+public class Tennis implements GLEventListener {
+ static {
+ GLProfile.initSingleton();
+ }
+ private float view_rotx = 0.0f, view_roty = 0.0f, view_rotz = 0.0f; //View angles
+ private float sx = 0.0f, sy = 0.0f; //X, Y coords of Mydesk
+ private float spx,spy,spz; //Speed of the ball
+ private float BallCx = 0.0f, BallCy = 0.0f, BallCz = 0.0f; //Coords of the ball
+ private float EnDeskCx = 0.0f, EnDeskCy = 0.0f; //X, Y coords of Endesk
+ private int cube=0, mydesk=0, endesk=0, ball=0, box=0; //Flags of the existence
+ private int swapInterval;
+ private static Texture[] texture;
+ private float Bax=0, Bay=0; //Acceleration summands
+ private float Vec=3; //Balls direction
+ private boolean CanF=false; //Ready for play
+
+ private int WindowW=0, WindowH=0;
+
+ private float LPositionDX=0, NPositionDX=0; //Mouse positions
+ private float LPositionDY=0, NPositionDY=0; //
+ private float DspeedX=0, DspeedY=0; //Speed of Mydesk
+
+ private boolean mouseButtonDown = false, control = true;
+ private int prevMouseX, prevMouseY;
+
+ public static void main(String[] args) {
+ // set argument 'NotFirstUIActionOnProcess' in the JNLP's application-desc tag for example
+ // <application-desc main-class="demos.j2d.TextCube"/>
+ // <argument>NotFirstUIActionOnProcess</argument>
+ // </application-desc>
+ // boolean firstUIActionOnProcess = 0==args.length || !args[0].equals("NotFirstUIActionOnProcess") ;
+
+ java.awt.Frame frame = new java.awt.Frame("Tennis Demo");
+ frame.setSize(640, 480);
+ frame.setLayout(new java.awt.BorderLayout());
+
+ final Animator animator = new Animator();
+ frame.addWindowListener(new java.awt.event.WindowAdapter() {
+ public void windowClosing(java.awt.event.WindowEvent e) {
+ // Run this on another thread than the AWT event queue to
+ // make sure the call to Animator.stop() completes before
+ // exiting
+ new Thread(new Runnable() {
+ public void run() {
+ animator.stop();
+ System.exit(0);
+ }
+ }).start();
+ }
+ });
+
+ GLCanvas canvas = new GLCanvas();
+ animator.add(canvas);
+ // GLCapabilities caps = new GLCapabilities(GLProfile.getDefault());
+ // GLCanvas canvas = new GLCanvas(caps);
+
+ final Tennis tennis = new Tennis();
+ canvas.addGLEventListener(tennis);
+
+ frame.add(canvas, java.awt.BorderLayout.CENTER);
+ frame.validate();
+
+ //Hide the mouse cursor
+ Toolkit t = Toolkit.getDefaultToolkit();
+ Image i = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB);
+ Cursor noCursor = t.createCustomCursor(i, new Point(0, 0), "none");
+ frame.setCursor(noCursor);
+
+ frame.setVisible(true);
+ animator.start();
+ }
+
+ public Tennis(int swapInterval) {
+ this.swapInterval = swapInterval;
+ }
+
+ public Tennis() {
+ this.swapInterval = 1;
+ }
+
+ public void init(GLAutoDrawable drawable) {
+ System.err.println("Tennis: Init: "+drawable);
+ // Use debug pipeline
+ // drawable.setGL(new DebugGL(drawable.getGL()));
+
+ GL2 gl = drawable.getGL().getGL2();
+
+ System.err.println("Chosen GLCapabilities: " + drawable.getChosenGLCapabilities());
+ System.err.println("INIT GL IS: " + gl.getClass().getName());
+ System.err.println("GL_VENDOR: " + gl.glGetString(GL2.GL_VENDOR));
+ System.err.println("GL_RENDERER: " + gl.glGetString(GL2.GL_RENDERER));
+ System.err.println("GL_VERSION: " + gl.glGetString(GL2.GL_VERSION));
+
+ float mat_specular[] =
+ { 1.0f, 1.0f, 1.0f, 1.0f };
+ float mat_shininess[] =
+ { 25.0f };
+ float light_position[] =
+ { 1.0f, 1.0f, 1.0f, 0.0f };
+
+ float red[] = { 0.8f, 0.1f, 0.0f, 0.7f };
+ float yellow[] = { 0.8f, 0.75f, 0.0f, 0.7f };
+ float blue[] = { 0.2f, 0.2f, 1.0f, 0.7f };
+ float brown[] = { 0.8f, 0.4f, 0.1f, 0.7f };
+
+ texture = new Texture[5];
+
+ //Load textures
+ try {
+ System.err.println("Loading texture...");
+ texture[0] = TextureIO.newTexture(getClass().getClassLoader().getResourceAsStream("demos/data/images/TennisTop.png"),
+ false,
+ TextureIO.PNG);
+ texture[1] = TextureIO.newTexture(getClass().getClassLoader().getResourceAsStream("demos/data/images/TennisBottom.png"),
+ false,
+ TextureIO.PNG);
+ texture[2] = TextureIO.newTexture(getClass().getClassLoader().getResourceAsStream("demos/data/images/TennisMyDesk.png"),
+ false,
+ TextureIO.PNG);
+ texture[3] = TextureIO.newTexture(getClass().getClassLoader().getResourceAsStream("demos/data/images/TennisEnDesk.png"),
+ false,
+ TextureIO.PNG);
+ texture[4] = TextureIO.newTexture(getClass().getClassLoader().getResourceAsStream("demos/data/images/Stars.png"),
+ false,
+ TextureIO.PNG);
+ System.err.println("Texture0 estimated memory size = " + texture[0].getEstimatedMemorySize());
+ System.err.println("Texture1 estimated memory size = " + texture[1].getEstimatedMemorySize());
+ System.err.println("Texture2 estimated memory size = " + texture[2].getEstimatedMemorySize());
+ System.err.println("Texture3 estimated memory size = " + texture[3].getEstimatedMemorySize());
+ System.err.println("Stars estimated memory size = " + texture[4].getEstimatedMemorySize());
+ } catch (IOException e) {
+ e.printStackTrace();
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ e.printStackTrace(new PrintStream(bos));
+ JOptionPane.showMessageDialog(null,
+ bos.toString(),
+ "Error loading texture",
+ JOptionPane.ERROR_MESSAGE);
+ throw new GLException(e);
+ //return;
+ }
+
+ gl.glShadeModel(GL2.GL_SMOOTH); // Enable Smooth Shading
+ gl.glClearDepth(1.0f); // Depth Buffer Setup
+ gl.glEnable(GL2.GL_DEPTH_TEST); // Enables Depth Testing
+ gl.glDepthFunc(GL2.GL_LEQUAL); // The Type Of Depth Testing To Do
+
+ // Really Nice Perspective Calculations
+ gl.glHint(GL2.GL_PERSPECTIVE_CORRECTION_HINT, GL2.GL_NICEST);
+ gl.glEnable(GL2.GL_TEXTURE_2D);
+
+ // Texture filter
+ gl.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_NONE);
+ gl.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_NONE);
+
+ // Light and material
+ gl.glMaterialfv(GL2.GL_FRONT, GL2.GL_SPECULAR, mat_specular, 0);
+ gl.glMaterialfv(GL2.GL_FRONT, GL2.GL_SHININESS, mat_shininess, 0);
+ gl.glLightfv(GL2.GL_LIGHT0, GL2.GL_POSITION, light_position, 0);
+ gl.glEnable(GL2.GL_LIGHTING);
+ gl.glEnable(GL2.GL_LIGHT0);
+
+
+ /* make the objects */
+ if(0>=cube) {
+ cube = gl.glGenLists(1);
+ gl.glNewList(cube, GL2.GL_COMPILE);
+ gl.glMaterialfv(GL2.GL_FRONT, GL2.GL_AMBIENT_AND_DIFFUSE, brown, 0);
+ cube(gl);
+ gl.glEndList();
+ System.err.println("cube list created: "+cube);
+ } else {
+ System.err.println("cube list reused: "+cube);
+ }
+
+ if(0>=box) {
+ box = gl.glGenLists(1);
+ gl.glNewList(box, GL2.GL_COMPILE);
+ gl.glMaterialfv(GL2.GL_FRONT, GL2.GL_AMBIENT_AND_DIFFUSE, brown, 0);
+ box(gl);
+ gl.glEndList();
+ System.err.println("box list created: "+box);
+ } else {
+ System.err.println("box list reused: "+box);
+ }
+
+ if(0>=mydesk) {
+ mydesk = gl.glGenLists(1);
+ gl.glNewList(mydesk, GL2.GL_COMPILE);
+ gl.glMaterialfv(GL2.GL_FRONT, GL2.GL_AMBIENT_AND_DIFFUSE, red, 0);
+ desk(gl, 2);
+ gl.glEndList();
+ System.err.println("mydesk list created: "+mydesk);
+ } else {
+ System.err.println("mydesk list reused: "+mydesk);
+ }
+
+ if(0>=endesk) {
+ endesk = gl.glGenLists(1);
+ gl.glNewList(endesk, GL2.GL_COMPILE);
+ gl.glMaterialfv(GL2.GL_FRONT, GL2.GL_AMBIENT_AND_DIFFUSE, blue, 0);
+ desk(gl, 3);
+ gl.glEndList();
+ System.err.println("endesk list created: "+endesk);
+ } else {
+ System.err.println("endesk list reused: "+endesk);
+ }
+
+ if(0>=ball) {
+ ball = gl.glGenLists(1);
+ gl.glNewList(ball, GL2.GL_COMPILE);
+ gl.glMaterialfv(GL2.GL_FRONT, GL2.GL_AMBIENT_AND_DIFFUSE, yellow, 0);
+ ball(gl);
+ gl.glEndList();
+ System.err.println("ball list created: "+ball);
+ } else {
+ System.err.println("ball list reused: "+ball);
+ }
+
+ gl.glEnable(GL2.GL_NORMALIZE);
+
+ MouseListener tennisMouse = new TennisMouseAdapter();
+ KeyListener tennisKeys = new TennisKeyAdapter();
+
+ if (drawable instanceof Window) {
+ Window window = (Window) drawable;
+ window.addMouseListener(tennisMouse);
+ window.addKeyListener(tennisKeys);
+ } else if (GLProfile.isAWTAvailable() && drawable instanceof java.awt.Component) {
+ java.awt.Component comp = (java.awt.Component) drawable;
+ new AWTMouseAdapter(tennisMouse).addTo(comp);
+ new AWTKeyAdapter(tennisKeys).addTo(comp);
+ }
+ }
+
+ public void dispose(GLAutoDrawable drawable) {
+ System.err.println("Tennis: Dispose");
+ }
+
+ public void display(GLAutoDrawable drawable) {
+
+ // Get the GL corresponding to the drawable we are animating
+ GL2 gl = drawable.getGL().getGL2();
+
+ if (mouseButtonDown == false && control == true)
+ MovMydesk();
+ MoveSphere();
+ MoveEnDesk();
+
+ gl.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
+
+ // Special handling for the case where the GLJPanel is translucent
+ // and wants to be composited with other Java 2D content
+ if (GLProfile.isAWTAvailable() &&
+ (drawable instanceof javax.media.opengl.awt.GLJPanel) &&
+ !((javax.media.opengl.awt.GLJPanel) drawable).isOpaque() &&
+ ((javax.media.opengl.awt.GLJPanel) drawable).shouldPreserveColorBufferIfTranslucent()) {
+ gl.glClear(GL2.GL_DEPTH_BUFFER_BIT);
+ } else {
+ gl.glClear(GL2.GL_COLOR_BUFFER_BIT | GL2.GL_DEPTH_BUFFER_BIT);
+ }
+
+ // Place the box and call its display list
+ gl.glDisable(GL2.GL_DEPTH_TEST);
+ gl.glCallList(box);
+ gl.glEnable(GL2.GL_DEPTH_TEST);
+
+ // Rotate the entire assembly of tennis based on how the user
+ // dragged the mouse around
+ gl.glPushMatrix();
+ gl.glRotatef(view_rotx, 1.0f, 0.0f, 0.0f);
+ gl.glRotatef(view_roty, 0.0f, 1.0f, 0.0f);
+ gl.glRotatef(view_rotz, 0.0f, 0.0f, 1.0f);
+
+ // Place the cube and call its display list
+ gl.glPushMatrix();
+ gl.glTranslatef(0.0f, 0.0f, 0.0f);
+ gl.glRotatef(0.0f, 0.0f, 0.0f, 1.0f);
+ gl.glCallList(cube);
+ gl.glPopMatrix();
+
+ // Place the mydesk and call its display list
+ gl.glPushMatrix();
+ gl.glTranslatef(sx, sy, 3.0f);
+ gl.glRotatef(0.0f, 0.0f, 0.0f, 1.0f);
+ gl.glCallList(mydesk);
+ gl.glPopMatrix();
+
+ // Place the endesk and call its display list
+ gl.glPushMatrix();
+ gl.glTranslatef(EnDeskCx, EnDeskCy, -3.0f);
+ gl.glRotatef(0.0f, 0.0f, 0.0f, 1.0f);
+ gl.glCallList(endesk);
+ gl.glPopMatrix();
+
+ // Place the ball and call its display list
+ gl.glPushMatrix();
+ gl.glTranslatef(BallCx, BallCy, BallCz);
+ gl.glRotatef(0.0f, 0.0f, 0.0f, 1.0f);
+ gl.glCallList(ball);
+ gl.glPopMatrix();
+
+ // Remember that every push needs a pop; this one is paired with
+ // rotating the entire tennis assembly
+ gl.glPopMatrix();
+ }
+
+ public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height)
+ {
+
+ System.err.println("Gears: Reshape "+x+"/"+y+" "+width+"x"+height);
+ GL2 gl = drawable.getGL().getGL2();
+
+ gl.setSwapInterval(swapInterval);
+
+ float h = (float)height / (float)width;
+
+ WindowW = width;
+ WindowH = height;
+
+ gl.glMatrixMode(GL2.GL_PROJECTION);
+
+ gl.glLoadIdentity();
+
+ if (h<1)
+ gl.glFrustum(-1.0f, 1.0f, -h, h, 1.0f, 60.0f);
+ else
+ {
+ h = 1.0f/h;
+ gl.glFrustum(-h, h, -1.0f, 1.0f, 1.0f, 60.0f);
+ }
+
+ gl.glMatrixMode(GL2.GL_MODELVIEW);
+ gl.glLoadIdentity();
+ gl.glTranslatef(0.0f, 0.0f, -6.0f);
+
+ }
+
+ public static void cube(GL2 gl)
+ {
+
+ gl.glShadeModel(GL2.GL_FLAT);
+
+ /* draw left sides */
+ gl.glBegin(GL2.GL_QUADS);
+
+ gl.glNormal3f(1.0f, 0.0f, 0.0f);
+ gl.glVertex3f(-2.0f, -1.5f, -3.0f);
+ gl.glVertex3f(-2.0f, 1.5f, -3.0f);
+ gl.glVertex3f(-2.0f, 1.5f, 3.0f);
+ gl.glVertex3f(-2.0f, -1.5f, 3.0f);
+
+ gl.glNormal3f(-1.0f, 0.0f, 0.0f);
+ gl.glVertex3f(-2.05f, -1.55f, -3.0f);
+ gl.glVertex3f(-2.05f, 1.55f, -3.0f);
+ gl.glVertex3f(-2.05f, 1.55f, 3.0f);
+ gl.glVertex3f(-2.05f, -1.55f, 3.0f);
+
+ gl.glEnd();
+
+ if (texture[0] != null) {
+ texture[0].enable(gl);
+ texture[0].bind(gl);
+ gl.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_TEXTURE_ENV_MODE, GL.GL_REPLACE);
+ TextureCoords coords = texture[0].getImageTexCoords();
+
+ /* draw up sides */
+ gl.glBegin(GL2.GL_QUADS);
+
+ gl.glNormal3f(0.0f, -1.0f, 0.0f);
+ gl.glTexCoord2f(coords.left(), coords.top());
+ gl.glVertex3f(-2.0f, 1.5f, -3.0f);
+ gl.glTexCoord2f(coords.left(), coords.bottom());
+ gl.glVertex3f(-2.0f, 1.5f, 3.0f);
+ gl.glTexCoord2f(coords.right(), coords.bottom());
+ gl.glVertex3f( 2.0f, 1.5f, 3.0f);
+ gl.glTexCoord2f(coords.right(), coords.top());
+ gl.glVertex3f( 2.0f, 1.5f, -3.0f);
+
+ gl.glEnd();
+
+ texture[0].disable(gl);
+ }
+
+ gl.glBegin(GL2.GL_QUADS);
+
+ gl.glNormal3f(0.0f, 1.0f, 0.0f);
+ gl.glVertex3f(-2.05f, 1.55f, -3.0f);
+ gl.glVertex3f(-2.05f, 1.55f, 3.0f);
+ gl.glVertex3f( 2.05f, 1.55f, 3.0f);
+ gl.glVertex3f( 2.05f, 1.55f, -3.0f);
+
+ gl.glEnd();
+
+ /* draw right sides */
+ gl.glBegin(GL2.GL_QUADS);
+
+ gl.glNormal3f(-1.0f, 0.0f, 0.0f);
+ gl.glVertex3f(2.0f, -1.5f, -3.0f);
+ gl.glVertex3f(2.0f, 1.5f, -3.0f);
+ gl.glVertex3f(2.0f, 1.5f, 3.0f);
+ gl.glVertex3f(2.0f, -1.5f, 3.0f);
+
+ gl.glNormal3f(1.0f, 0.0f, 0.0f);
+ gl.glVertex3f(2.05f, -1.55f, -3.0f);
+ gl.glVertex3f(2.05f, 1.55f, -3.0f);
+ gl.glVertex3f(2.05f, 1.55f, 3.0f);
+ gl.glVertex3f(2.05f, -1.55f, 3.0f);
+
+ gl.glEnd();
+
+ if (texture[1] != null) {
+ texture[1].enable(gl);
+ texture[1].bind(gl);
+ gl.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_TEXTURE_ENV_MODE, GL.GL_REPLACE);
+ TextureCoords coords = texture[1].getImageTexCoords();
+
+ /* draw down sides */
+ gl.glBegin(GL2.GL_QUADS);
+
+ gl.glNormal3f(0.0f, 1.0f, 0.0f);
+ gl.glTexCoord2f(coords.left(), coords.top());
+ gl.glVertex3f(-2.0f, -1.5f, -3.0f);
+ gl.glTexCoord2f(coords.left(), coords.bottom());
+ gl.glVertex3f(-2.0f, -1.5f, 3.0f);
+ gl.glTexCoord2f(coords.right(), coords.bottom());
+ gl.glVertex3f( 2.0f, -1.5f, 3.0f);
+ gl.glTexCoord2f(coords.right(), coords.top());
+ gl.glVertex3f( 2.0f, -1.5f, -3.0f);
+
+ gl.glNormal3f(0.0f, -1.0f, 0.0f);
+ gl.glVertex3f(-2.05f, -1.55f, -3.0f);
+ gl.glVertex3f(-2.05f, -1.55f, 3.0f);
+ gl.glVertex3f( 2.05f, -1.55f, 3.0f);
+ gl.glVertex3f( 2.05f, -1.55f, -3.0f);
+
+ gl.glEnd();
+
+ texture[1].disable(gl);
+ }
+
+ /* draw back sides */
+ gl.glBegin(GL2.GL_QUADS);
+
+ gl.glNormal3f(0.0f, 0.0f, -1.0f);
+
+ gl.glVertex3f(-2.05f, 1.55f, -3.0f);
+ gl.glVertex3f( 2.05f, 1.55f, -3.0f);
+ gl.glVertex3f( 2.0f, 1.5f, -3.0f);
+ gl.glVertex3f(-2.0f, 1.5f, -3.0f);
+
+ gl.glVertex3f(-2.05f, -1.55f, -3.0f);
+ gl.glVertex3f( 2.05f, -1.55f, -3.0f);
+ gl.glVertex3f( 2.0f, -1.5f, -3.0f);
+ gl.glVertex3f(-2.0f, -1.5f, -3.0f);
+
+ gl.glVertex3f(-2.05f, -1.55f, -3.0f);
+ gl.glVertex3f(-2.05f, 1.55f, -3.0f);
+ gl.glVertex3f(-2.0f, 1.5f, -3.0f);
+ gl.glVertex3f(-2.0f, -1.5f, -3.0f);
+
+ gl.glVertex3f(2.05f, -1.55f, -3.0f);
+ gl.glVertex3f(2.05f, 1.55f, -3.0f);
+ gl.glVertex3f(2.0f, 1.5f, -3.0f);
+ gl.glVertex3f(2.0f, -1.5f, -3.0f);
+
+ gl.glEnd();
+
+ /* draw front sides */
+ gl.glBegin(GL2.GL_QUADS);
+
+ gl.glNormal3f(0.0f, 0.0f, 1.0f);
+
+ gl.glVertex3f(-2.05f, 1.55f, 3.0f);
+ gl.glVertex3f( 2.05f, 1.55f, 3.0f);
+ gl.glVertex3f( 2.0f, 1.5f, 3.0f);
+ gl.glVertex3f(-2.0f, 1.5f, 3.0f);
+
+ gl.glVertex3f(-2.05f, -1.55f, 3.0f);
+ gl.glVertex3f( 2.05f, -1.55f, 3.0f);
+ gl.glVertex3f( 2.0f, -1.5f, 3.0f);
+ gl.glVertex3f(-2.0f, -1.5f, 3.0f);
+
+ gl.glVertex3f(-2.05f, -1.55f, 3.0f);
+ gl.glVertex3f(-2.05f, 1.55f, 3.0f);
+ gl.glVertex3f(-2.0f, 1.5f, 3.0f);
+ gl.glVertex3f(-2.0f, -1.5f, 3.0f);
+
+ gl.glVertex3f(2.05f, -1.55f, 3.0f);
+ gl.glVertex3f(2.05f, 1.55f, 3.0f);
+ gl.glVertex3f(2.0f, 1.5f, 3.0f);
+ gl.glVertex3f(2.0f, -1.5f, 3.0f);
+
+ gl.glEnd();
+
+ }
+
+ public static void box(GL2 gl) //Usually "box" mean box, but there only one side is enough
+ {
+
+ gl.glShadeModel(GL2.GL_FLAT);
+
+ if (texture[4] != null) {
+ texture[4].enable(gl);
+ texture[4].bind(gl);
+ gl.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_WRAP_S, GL2.GL_REPEAT);
+ gl.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_WRAP_T, GL2.GL_REPEAT);
+ gl.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_TEXTURE_ENV_MODE, GL.GL_REPLACE);
+
+ /* draw the side */
+ gl.glBegin(GL2.GL_QUADS);
+
+ gl.glNormal3f(0.0f, 0.0f, 1.0f);
+ gl.glTexCoord2f(0, 0);
+ gl.glVertex3f(-8.0f, -8.0f, 0.0f);
+ gl.glTexCoord2f(0, 8.0f);
+ gl.glVertex3f(-8.0f, 8.0f, 0.0f);
+ gl.glTexCoord2f(8.0f, 8.0f);
+ gl.glVertex3f( 8.0f, 8.0f, 0.0f);
+ gl.glTexCoord2f(8.0f, 0);
+ gl.glVertex3f( 8.0f, -8.0f, 0.0f);
+
+ gl.glEnd();
+
+ texture[4].disable(gl);
+ }
+
+ }
+
+ public static void desk(GL2 gl, int two_or_three)
+ {
+
+ int i;
+ float temp1;
+
+ gl.glShadeModel(GL2.GL_FLAT);
+
+ if (texture[two_or_three] != null) {
+ texture[two_or_three].enable(gl);
+ texture[two_or_three].bind(gl);
+ gl.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_WRAP_S, GL2.GL_REPEAT);
+ gl.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_WRAP_T, GL2.GL_REPEAT);
+ gl.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_TEXTURE_ENV_MODE, GL.GL_REPLACE);
+
+ /* draw the front */
+ gl.glBegin(GL2.GL_QUAD_STRIP);
+
+ gl.glNormal3f(0.0f, 0.0f, 1.0f);
+ for (i=0; i<25; i++)
+ {
+ temp1 = (float) Math.pow(Math.sin(i/24.0f*Math.PI), 0.4d);
+
+ gl.glTexCoord2f((i-12)/40.0f, temp1/4 + 0.75f);
+ gl.glVertex3f((i-12)/40.0f, temp1/10 + 0.1f , 0.01f + temp1/25);
+ gl.glTexCoord2f((i-12)/40.0f, -temp1/4 + 0.25f);
+ gl.glVertex3f((i-12)/40.0f, -temp1/10 - 0.1f, 0.01f + temp1/25);
+ }
+
+ gl.glEnd();
+
+ /* draw the back */
+ gl.glBegin(GL2.GL_QUAD_STRIP);
+
+ gl.glNormal3f(0.0f, 0.0f, -1.0f);
+ for (i=0; i<25; i++)
+ {
+ temp1 = (float) Math.pow(Math.sin(i/24.0f*Math.PI), 0.4d);
+
+ gl.glTexCoord2f((i-12)/40.0f, temp1/4 + 0.75f);
+ gl.glVertex3f((i-12)/40.0f, temp1/10 + 0.1f , -0.01f - temp1/25);
+ gl.glTexCoord2f((i-12)/40.0f, -temp1/4 + 0.25f);
+ gl.glVertex3f((i-12)/40.0f, -temp1/10 - 0.1f, -0.01f - temp1/25);
+
+ }
+
+ gl.glEnd();
+
+ texture[2].disable(gl);
+ }
+
+ /* draw the top side */
+ gl.glBegin(GL2.GL_QUAD_STRIP);
+
+ gl.glNormal3f(0.0f, 1.0f, 0.0f);
+ for (i=0; i<25; i++)
+ {
+ temp1 = (float) Math.pow(Math.sin(i/24.0f*Math.PI), 0.4d);
+
+ gl.glVertex3f((i-12)/40.0f, temp1/10 + 0.1f , -0.01f - temp1/25);
+ gl.glVertex3f((i-12)/40.0f, temp1/10 + 0.1f , 0.01f + temp1/25);
+ }
+
+ gl.glEnd();
+
+ /* draw the bottom side */
+ gl.glBegin(GL2.GL_QUAD_STRIP);
+
+ gl.glNormal3f(0.0f, -1.0f, 0.0f);
+ for (i=0; i<25; i++)
+ {
+ temp1 = (float) Math.pow(Math.sin(i/24.0f*Math.PI), 0.4d);
+
+ gl.glVertex3f((i-12)/40.0f, -temp1/10 - 0.1f, 0.01f + temp1/25);
+ gl.glVertex3f((i-12)/40.0f, -temp1/10 - 0.1f, -0.01f - temp1/25);
+ }
+
+ gl.glEnd();
+
+ /* draw the left and right sides */
+ gl.glBegin(GL2.GL_QUADS);
+
+ gl.glNormal3f(-1.0f, 0.0f, 0.0f);
+ gl.glVertex3f((-12)/40.0f, -0.1f, 0.01f);
+ gl.glVertex3f((-12)/40.0f, +0.1f, 0.01f);
+ gl.glVertex3f((-12)/40.0f, +0.1f, -0.01f);
+ gl.glVertex3f((-12)/40.0f, -0.1f, -0.01f);
+
+ gl.glNormal3f(1.0f, 0.0f, 0.0f);
+ gl.glVertex3f((+12)/40.0f, -0.1f, 0.01f);
+ gl.glVertex3f((+12)/40.0f, +0.1f, 0.01f);
+ gl.glVertex3f((+12)/40.0f, +0.1f, -0.01f);
+ gl.glVertex3f((+12)/40.0f, -0.1f, -0.01f);
+
+
+ gl.glEnd();
+
+ }
+
+ public static void ball(GL2 gl)
+ {
+
+ int i,j;
+ float y1,y2,r1,r2,x,z;
+
+ gl.glShadeModel(GL2.GL_FLAT);
+
+ /* draw the ball */
+ gl.glBegin(GL2.GL_QUAD_STRIP);
+
+ for (i=0; i<20; i++)
+ {
+ y1 = (float) Math.cos((i)/20.0f*Math.PI)/10;
+ y2 = (float) Math.cos((i+1)/20.0f*Math.PI)/10;
+ r1 = (float) Math.sqrt(Math.abs(0.01f-y1*y1));
+ r2 = (float) Math.sqrt(Math.abs(0.01f-y2*y2));
+
+ for (j=0; j<21; j++)
+ {
+ x = (float) (r1*Math.cos((float)j/21*2.0f*Math.PI));
+ z = (float) (r1*Math.sin((float)j/21*2.0f*Math.PI));
+ gl.glNormal3f(10*x, 10*y1, 10*z);
+ gl.glVertex3f(x, y1, z);
+
+ x = (float) (r2*Math.cos((float)j/21*2.0f*Math.PI));
+ z = (float) (r2*Math.sin((float)j/21*2.0f*Math.PI));
+ gl.glNormal3f(10*x, 10*y2, 10*z);
+ gl.glVertex3f(x, y2, z);
+ }
+ }
+
+ gl.glEnd();
+
+ }
+
+ public void MoveSphere()
+ {
+
+ // Ball out
+
+ if ((BallCz>3)||(BallCz<-3))
+ {
+
+ Vec=BallCz;
+
+ BallCx = 0.0f;
+ BallCy = 0.0f;
+ BallCz = 0.0f;
+
+ spz=0;
+ spx=0;
+ spy=0;
+
+ CanF=false;
+
+ Bax=0;
+ Bay=0;
+
+ }
+
+ // Ball rebound
+
+ if ((spz<0)&&(BallCz+spz<-2.8)&&(BallCx+spx<EnDeskCx+0.3)&&(BallCx+spx>EnDeskCx-0.3)&&(BallCy+spy<EnDeskCy+0.2)&&(BallCy+spy>EnDeskCy-0.2))
+ {
+
+ spz=-spz+0.002f;
+ spx=spx+(BallCx-EnDeskCx)/10;
+ spy=spy+(BallCy-EnDeskCy)/10;
+
+ }
+
+ if ((spz>0)&&(BallCz+spz>2.8)&&(BallCx+spx<sx+0.3)&&(BallCx+spx>sx-0.3)&&(BallCy+spy<sy+0.2)&&(BallCy+spy>sy-0.2))
+ {
+
+ spz=-spz-0.002f;
+ spx=spx+(BallCx-sx)/10;
+ spy=spy+(BallCy-sy)/10;
+
+ Bax=DspeedX/100;
+ Bay=DspeedY/100;
+
+ }
+
+ if ((BallCx+spx<-1.9)||(BallCx+spx>1.9))
+ spx=-spx;
+
+ if ((BallCy+spy<-1.4)||(BallCy+spy>1.4))
+ spy=-spy;
+
+ // Ball acceleration
+
+ spx=spx+Bax;
+ spy=spy+Bay;
+
+ // Ball move
+
+ if (CanF==true)
+
+ BallCx += spx;
+ BallCy += spy;
+ BallCz += spz;
+
+ //Less the acceleration
+
+ Bax=Bax-Bax/100;
+ Bay=Bay-Bay/100;
+
+ }
+
+ public void MoveEnDesk()
+ {
+
+ //Just follow for the ball
+
+ float sx,sy;
+ double gip=Math.sqrt((BallCx-EnDeskCx)*(BallCx-EnDeskCx)+(BallCy-EnDeskCy)*(BallCy-EnDeskCy));
+
+ if (gip<0.07)
+ {
+ sx=Math.abs((BallCx-EnDeskCx));
+ sy=Math.abs((BallCy-EnDeskCy));
+ }
+ else
+ {
+ sx=Math.abs((BallCx-EnDeskCx))/((float) gip)*0.07f;
+ sy=Math.abs((BallCy-EnDeskCy))/((float) gip)*0.07f;
+ }
+
+ if ((BallCx-EnDeskCx>0)&&(EnDeskCx+sx<=1.7))
+ EnDeskCx += sx;
+
+ if ((BallCx-EnDeskCx<0)&&(EnDeskCx-sx>=-1.7))
+ EnDeskCx -= sx;
+
+ if ((BallCy-EnDeskCy>0)&&(EnDeskCy+sy<=1.3))
+ EnDeskCy += sy;
+
+ if ((BallCy-EnDeskCy<0)&&(EnDeskCy-sy>=-1.3))
+ EnDeskCy -= sy;
+
+ }
+
+ public void MovMydesk() {
+
+ LPositionDX = sx;
+ LPositionDY = sy;
+
+ int x = MouseInfo.getPointerInfo().getLocation().x;
+ int y = MouseInfo.getPointerInfo().getLocation().y;
+
+ sx = sx + (float)(x-500.0f)/300.0f;
+ sy = sy + (float)(400.0f-y)/300.0f;
+
+ //Check cube borders
+
+ if (sx<-1.7f || sx>1.7f)
+ {
+ if (sx>0) sx = 1.7f;
+ else sx = -1.7f;
+ }
+
+ if (sy<-1.3 || sy>1.3)
+ {
+ if (sy>0) sy = 1.3f;
+ else sy = -1.3f;
+ }
+
+ //Return the mouse back from screen borders
+ try {
+ Robot r = new Robot();
+ r.mouseMove(500,400);
+ } catch(AWTException ex) {}
+
+ NPositionDX=sx;
+ NPositionDY=sy;
+
+ DspeedX=NPositionDX-LPositionDX;
+ DspeedY=NPositionDY-LPositionDY;
+
+ }
+
+ class TennisKeyAdapter extends KeyAdapter {
+ public void keyPressed(KeyEvent e) {
+ int kc = e.getKeyCode();
+ if(KeyEvent.VK_ESCAPE == kc) {
+ System.exit(0);
+ }
+ if(KeyEvent.VK_CONTROL == kc) {
+ control = false;
+ }
+ if(KeyEvent.VK_SPACE == kc) { //Ready for play
+ if (CanF==false)
+ {
+ if (Vec<0)
+ spz=-0.07f;
+ else
+ spz=0.07f;
+ }
+ CanF=true;
+ }
+ }
+
+ public void keyReleased(KeyEvent e) { //Give the mouse control to the user
+ int kc = e.getKeyCode();
+ if(KeyEvent.VK_CONTROL == kc) {
+ control = true;
+ }
+ }
+
+ }
+
+ class TennisMouseAdapter extends MouseAdapter {
+ public void mousePressed(MouseEvent e) {
+ prevMouseX = e.getX();
+ prevMouseY = e.getY();
+
+ mouseButtonDown = true;
+ }
+
+ public void mouseReleased(MouseEvent e) {
+ mouseButtonDown = false;
+ }
+
+ public void mouseDragged(MouseEvent e) {
+
+ int x = e.getX();
+ int y = e.getY();
+
+ float thetaY = 360.0f * ( (float)(x-prevMouseX)/(float)WindowW);
+ float thetaX = 360.0f * ( (float)(prevMouseY-y)/(float)WindowH);
+
+ prevMouseX = x;
+ prevMouseY = y;
+
+ view_rotx += thetaX;
+ view_roty += thetaY;
+ }
+ }
+
+}
diff --git a/src/demos/texture/TestSubImage.java b/src/demos/texture/TestSubImage.java index 377a910..05cbb59 100755 --- a/src/demos/texture/TestSubImage.java +++ b/src/demos/texture/TestSubImage.java @@ -120,7 +120,7 @@ public class TestSubImage { if (convertedImage == null) { // Get rid of any previously allocated texture if (texture != null) { - texture.dispose(); + texture.destroy(gl); texture = null; } @@ -183,15 +183,15 @@ public class TestSubImage { yOrigin = texture.getHeight() - yOrigin; } - texture.updateSubImage(textureData, 0, + texture.updateSubImage(gl, textureData, 0, union.x, yOrigin, union.x, yOrigin, union.width, union.height); } // Now draw one quad with the texture - texture.enable(); - texture.bind(); + texture.enable(gl); + texture.bind(gl); gl.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_TEXTURE_ENV_MODE, GL2.GL_REPLACE); TextureCoords coords = texture.getImageTexCoords(); gl.glBegin(GL2.GL_QUADS); @@ -204,7 +204,7 @@ public class TestSubImage { gl.glTexCoord2f(coords.left(), coords.top()); gl.glVertex3f(0, 1, 0); gl.glEnd(); - texture.disable(); + texture.disable(gl); } public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {} diff --git a/src/demos/texture/TestTexture.java b/src/demos/texture/TestTexture.java index 057e957..224c247 100755 --- a/src/demos/texture/TestTexture.java +++ b/src/demos/texture/TestTexture.java @@ -184,7 +184,7 @@ public class TestTexture implements GLEventListener { if (flushTexture) { flushTexture = false; if (texture != null) { - texture.dispose(); + texture.destroy(gl); texture = null; } } @@ -193,7 +193,7 @@ public class TestTexture implements GLEventListener { newTexture = false; if (texture != null) { - texture.dispose(); + texture.destroy(gl); texture = null; } @@ -214,8 +214,8 @@ public class TestTexture implements GLEventListener { } if (texture != null) { - texture.enable(); - texture.bind(); + texture.enable(gl); + texture.bind(gl); gl.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_TEXTURE_ENV_MODE, GL.GL_REPLACE); TextureCoords coords = texture.getImageTexCoords(); @@ -229,7 +229,7 @@ public class TestTexture implements GLEventListener { gl.glTexCoord2f(coords.left(), coords.top()); gl.glVertex3f(0, 1, 0); gl.glEnd(); - texture.disable(); + texture.disable(gl); } } diff --git a/src/demos/texture/TextureConvert.java b/src/demos/texture/TextureConvert.java index 7967416..cd198e0 100755 --- a/src/demos/texture/TextureConvert.java +++ b/src/demos/texture/TextureConvert.java @@ -39,7 +39,7 @@ package demos.texture; -import com.jogamp.opengl.util.FileUtil; +import com.jogamp.common.util.IOUtil; import com.jogamp.opengl.util.texture.Texture; import com.jogamp.opengl.util.texture.TextureData; import com.jogamp.opengl.util.texture.TextureIO; @@ -84,7 +84,7 @@ public class TextureConvert { GL gl = pbuffer.getGL(); boolean attemptCompression = false; - if (TextureIO.DDS.equals(FileUtil.getFileSuffix(outputFile))) { + if (TextureIO.DDS.equals(IOUtil.getFileSuffix(outputFile))) { if (gl.isExtensionAvailable("GL_EXT_texture_compression_s3tc") || gl.isExtensionAvailable("GL_NV_texture_compression_vtc")) { attemptCompression = true; diff --git a/src/demos/util/Cubemap.java b/src/demos/util/Cubemap.java index 9f31b9a..abca371 100755 --- a/src/demos/util/Cubemap.java +++ b/src/demos/util/Cubemap.java @@ -39,7 +39,7 @@ package demos.util; -import com.jogamp.opengl.util.FileUtil; +import com.jogamp.common.util.IOUtil; import com.jogamp.opengl.util.texture.Texture; import com.jogamp.opengl.util.texture.TextureData; import com.jogamp.opengl.util.texture.TextureIO; @@ -62,21 +62,21 @@ public class Cubemap { GL.GL_TEXTURE_CUBE_MAP_POSITIVE_Z, GL.GL_TEXTURE_CUBE_MAP_NEGATIVE_Z }; - public static Texture loadFromStreams(ClassLoader scope, + public static Texture loadFromStreams(GL gl, + ClassLoader scope, String basename, - String suffix, - boolean mipmapped) throws IOException, GLException { + String suffix, boolean mipmapped) throws IOException, GLException { Texture cubemap = TextureIO.newTexture(GL.GL_TEXTURE_CUBE_MAP); for (int i = 0; i < suffixes.length; i++) { String resourceName = basename + suffixes[i] + "." + suffix; TextureData data = TextureIO.newTextureData(GLContext.getCurrentGL().getGLProfile(), scope.getResourceAsStream(resourceName), mipmapped, - FileUtil.getFileSuffix(resourceName)); + IOUtil.getFileSuffix(resourceName)); if (data == null) { throw new IOException("Unable to load texture " + resourceName); } - cubemap.updateImage(data, targets[i]); + cubemap.updateImage(gl, data, targets[i]); } return cubemap; diff --git a/src/demos/util/DurationTimer.java b/src/demos/util/DurationTimer.java index c0f88e7..18a7f40 100644 --- a/src/demos/util/DurationTimer.java +++ b/src/demos/util/DurationTimer.java @@ -58,7 +58,7 @@ public class DurationTimer { accumulatedTime += (curTime - startTime); } - public long getDuration() { + public long getTotalFPSDuration() { return accumulatedTime; } diff --git a/src/demos/vertexProgRefract/VertexProgRefract.java b/src/demos/vertexProgRefract/VertexProgRefract.java index cac8d5a..9915fae 100644 --- a/src/demos/vertexProgRefract/VertexProgRefract.java +++ b/src/demos/vertexProgRefract/VertexProgRefract.java @@ -299,10 +299,10 @@ public class VertexProgRefract extends Demo { gl.glProgramEnvParameter4fARB(GL2.GL_VERTEX_PROGRAM_ARB, 3, 0.0f, 1.0f, 2.0f, 3.0f); // misc constants try { - cubemap = Cubemap.loadFromStreams(getClass().getClassLoader(), + cubemap = Cubemap.loadFromStreams(gl, + getClass().getClassLoader(), "demos/data/cubemaps/uffizi_", - "png", - true); + "png", true); } catch (IOException e) { shutdownDemo(); throw new RuntimeException(e); @@ -403,15 +403,15 @@ public class VertexProgRefract extends Demo { // set texture transforms gl.glActiveTexture(GL.GL_TEXTURE0); - cubemap.bind(); - cubemap.enable(); + cubemap.bind(gl); + cubemap.enable(gl); gl.glMatrixMode(GL.GL_TEXTURE); gl.glLoadIdentity(); viewer.updateInverseRotation(gl); gl.glActiveTexture(GL.GL_TEXTURE1); - cubemap.bind(); - cubemap.enable(); + cubemap.bind(gl); + cubemap.enable(gl); gl.glMatrixMode(GL.GL_TEXTURE); gl.glLoadIdentity(); viewer.updateInverseRotation(gl); @@ -617,8 +617,8 @@ public class VertexProgRefract extends Demo { gl.glDisable(GL.GL_TEXTURE_CUBE_MAP); gl.glActiveTexture(GL.GL_TEXTURE0); - cubemap.bind(); - cubemap.enable(); + cubemap.bind(gl); + cubemap.enable(gl); // This is a workaround for a driver bug on Mac OS X where the // normals are not being sent down to the hardware in diff --git a/src/jbullet/src/javabullet/collision/dispatch/ConvexConvexAlgorithm.java b/src/jbullet/src/javabullet/collision/dispatch/ConvexConvexAlgorithm.java index 6b674c3..08bd8ce 100644 --- a/src/jbullet/src/javabullet/collision/dispatch/ConvexConvexAlgorithm.java +++ b/src/jbullet/src/javabullet/collision/dispatch/ConvexConvexAlgorithm.java @@ -104,7 +104,7 @@ public class ConvexConvexAlgorithm extends CollisionAlgorithm { ConvexShape min1 = (ConvexShape) body1.getCollisionShape(); ClosestPointInput input = pointInputsPool.get(); - input.init(); + input.init(gl); // JAVA NOTE: original: TODO: if (dispatchInfo.m_useContinuous) gjkPairDetector.setMinkowskiA(min0); diff --git a/src/jbullet/src/javabullet/collision/narrowphase/GjkConvexCast.java b/src/jbullet/src/javabullet/collision/narrowphase/GjkConvexCast.java index a5daad0..0e94d54 100644 --- a/src/jbullet/src/javabullet/collision/narrowphase/GjkConvexCast.java +++ b/src/jbullet/src/javabullet/collision/narrowphase/GjkConvexCast.java @@ -113,7 +113,7 @@ public class GjkConvexCast implements ConvexCast { GjkPairDetector gjk = new GjkPairDetector(raySphere, convex, simplexSolver, penSolverPtr); ClosestPointInput input = pointInputsPool.get(); - input.init(); + input.init(gl); input.transformA.set(sphereTr); input.transformB.set(identityTrans); @@ -162,7 +162,7 @@ public class GjkConvexCast implements ConvexCast { GjkPairDetector gjk = new GjkPairDetector(raySphere, convex, simplexSolver, penSolverPtr); ClosestPointInput input = pointInputsPool.get(); - input.init(); + input.init(gl); input.transformA.set(sphereTr); input.transformB.set(identityTrans); diff --git a/src/jbullet/src/javabullet/demos/opengl/JOGL.java b/src/jbullet/src/javabullet/demos/opengl/JOGL.java index 44afa0d..483c652 100644 --- a/src/jbullet/src/javabullet/demos/opengl/JOGL.java +++ b/src/jbullet/src/javabullet/demos/opengl/JOGL.java @@ -101,7 +101,7 @@ public class JOGL implements WindowListener, MouseListener { // window.setEventHandlerMode(GLWindow.EVENT_HANDLER_GL_CURRENT); // default // window.setEventHandlerMode(GLWindow.EVENT_HANDLER_GL_NONE); // no current .. - window.enablePerfLog(true); + window.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err); // Size OpenGL to Video Surface window.setSize(width, height); window.setFullscreen(true); @@ -109,7 +109,7 @@ public class JOGL implements WindowListener, MouseListener { width = window.getWidth(); height = window.getHeight(); - while (!quit && window.getDuration() < 200000) { + while (!quit && window.getTotalFPSDuration() < 200000) { window.display(); } diff --git a/www/applet-gears-next.jnlp b/www/applet-gears-next.jnlp deleted file mode 100644 index e5ddf7a..0000000 --- a/www/applet-gears-next.jnlp +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<jnlp href="applet-gears-next.jnlp"> - <information> - <title>JOGL JNLP Applet Gears Demo - NEXT</title> - <vendor>JogAmp Community</vendor> - <homepage href="http://jogamp.org/jogl-demos/"/> - <description>Gears Demo - NEXT</description> - <description kind="short">Brian Paul's Gears demo ported to Java and JOGL.</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://jogamp.org/deployment/webstart-next/jogl-demos/jogl-demos.jar" main="true"/> - <jar href="http://jogamp.org/deployment/webstart-next/jogl-demos/jogl-demos-util.jar"/> - <extension name="newt-all-awt" href="http://jogamp.org/deployment/webstart-next/newt-all-awt.jnlp" /> - </resources> - - <applet-desc - name="Gears-Applet" - main-class="demos.applets.GearsApplet" - width="640" - height="480"> - </applet-desc> -</jnlp> diff --git a/www/applet-gears.jnlp b/www/applet-gears.jnlp deleted file mode 100644 index 4c952aa..0000000 --- a/www/applet-gears.jnlp +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<jnlp href="applet-gears.jnlp"> - <information> - <title>JOGL JNLP Applet Gears Demo</title> - <vendor>JogAmp Community</vendor> - <homepage href="http://jogamp.org/jogl-demos/"/> - <description>Gears Demo</description> - <description kind="short">Brian Paul's Gears demo ported to Java and JOGL.</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://jogamp.org/deployment/webstart/jogl-demos/jogl-demos.jar" main="true"/> - <jar href="http://jogamp.org/deployment/webstart/jogl-demos/jogl-demos-util.jar"/> - <extension name="newt-all-awt" href="http://jogamp.org/deployment/webstart/newt-all-awt.jnlp" /> - </resources> - - <applet-desc - name="Gears-Applet" - main-class="demos.applets.GearsApplet" - width="640" - height="480"> - </applet-desc> -</jnlp> diff --git a/www/applet-redsquare-newtawt-next.html b/www/applet-redsquare-newtawt-next.html deleted file mode 100644 index fd92358..0000000 --- a/www/applet-redsquare-newtawt-next.html +++ /dev/null @@ -1,35 +0,0 @@ -<!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://jogamp.org/deployment/util/applet-launcher.jar, - http://jogamp.org/deployment/webstart-next/newt.all.jar, - http://jogamp.org/deployment/webstart-next/nativewindow.all.jar, - http://jogamp.org/deployment/webstart-next/jogl.all.jar, - http://jogamp.org/deployment/webstart-next/gluegen-rt.jar, - http://jogamp.org/deployment/webstart-next/jogl-demos/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://jogamp.org/deployment/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 deleted file mode 100644 index 686a4bd..0000000 --- a/www/applet-redsquare-newtawt-next.jnlp +++ /dev/null @@ -1,26 +0,0 @@ -<?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>JogAmp Community</vendor> - <homepage href="http://jogamp.org/jogl-demos/"/> - <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://jogamp.org/deployment/webstart-next/jogl-demos/jogl-demos.jar" main="true"/> - <jar href="http://jogamp.org/deployment/webstart-next/jogl-demos/jogl-demos-util.jar"/> - <extension name="newt-all-awt" href="http://jogamp.org/deployment/webstart-next/newt-all-awt.jnlp" /> - </resources> - - <applet-desc - name="RedSquare-NEWT-AWT-Applet" - main-class="demos.applets.RedSquareNEWTAWTApplet" - width="640" - height="480"> - </applet-desc> -</jnlp> diff --git a/www/applettest-jnlp-next.html b/www/applettest-jnlp-next.html deleted file mode 100644 index a9a3a2e..0000000 --- a/www/applettest-jnlp-next.html +++ /dev/null @@ -1,35 +0,0 @@ -<!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://jogamp.org/deployment/util/applet-launcher.jar, - http://jogamp.org/deployment/webstart-next/newt.all.jar, - http://jogamp.org/deployment/webstart-next/nativewindow.all.jar, - http://jogamp.org/deployment/webstart-next/jogl.all.jar, - http://jogamp.org/deployment/webstart-next/gluegen-rt.jar, - http://jogamp.org/deployment/webstart-next/jogl-demos/jogl-demos.jar"> - <param name="codebase_lookup" value="false"> - <param name="subapplet.classname" value="demos.applets.GearsApplet"> - <param name="subapplet.displayname" value="JOGL Gears Applet"> - <param name="noddraw.check" value="true"> - <param name="progressbar" value="true"> - <param name="jnlpNumExtensions" value="1"> - <param name="jnlpExtension1" - value="http://jogamp.org/deployment/webstart-next/jogl-core.jnlp"> - <param name="java_arguments" value="-Dsun.java2d.noddraw=true"> - <param name="jnlp_href" value="applet-gears-next.jnlp"> -</applet> - -</P> -<P> - -</body> -</html> diff --git a/www/applettest-joal-next.html b/www/applettest-joal-next.html deleted file mode 100644 index 48b46f8..0000000 --- a/www/applettest-joal-next.html +++ /dev/null @@ -1,36 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html> -<head> -<title>JOGL / JOAL Applet Test - Next JOGL Version</title> -</head> -<body> - -<P> - -<applet code="org.jdesktop.applet.util.JNLPAppletLauncher" - width=600 - height=400 - archive="http://jogamp.org/deployment/util/applet-launcher.jar, - http://jogamp.org/deployment/webstart-next/newt.all.jar, - http://jogamp.org/deployment/webstart-next/nativewindow.all.jar, - http://jogamp.org/deployment/webstart-next/jogl.all.jar, - http://jogamp.org/deployment/webstart-next/gluegen-rt.jar, - http://jogamp.org/deployment/webstart-next/jogl-demos/jogl-demos.jar, - http://jogamp.org/deployment/webstart-next/joal.jar, - <param name="codebase_lookup" value="false"> - <param name="subapplet.classname" VALUE="demos.applets.GearsJOALApplet"> - <param name="subapplet.displayname" VALUE="JOGL / JOAL Gears Applet"> - <param name="noddraw.check" value="true"> - <param name="progressbar" value="true"> - <param name="jnlpNumExtensions" value="2"> - <param name="jnlpExtension1" - value="http://jogamp.org/deployment/webstart-next/jogl-core.jnlp"> - <param name="jnlpExtension2" - value="http://jogamp.org/deployment/webstart-next/joal.jnlp"> -</applet> - - -</P> - -</body> -</html> diff --git a/www/applettest-joal.html b/www/applettest-joal.html deleted file mode 100644 index 0d97d22..0000000 --- a/www/applettest-joal.html +++ /dev/null @@ -1,102 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html> -<head> -<title>JOGL / JOAL Applet Test</title> -</head> -<body> - -<P> - -The new <a -href="http://jogamp.org/applet-launcher/www/">JNLPAppletLauncher</a> -supports deployment of high-end applets using arbitrary extensions -such as JOGL for 3D graphics and JOAL for spatialized audio. The -user's applet does not have to be signed, and no manual installation -of software on the user's machine is necessary. Combined JOGL and JOAL -applets are supported by the JNLPAppletLauncher on all OS and CPU -combinations where these libraries are supported: currently -Windows/x86, Linux/x86, and Mac OS X, both PowerPC and Intel. - -</P> -<P> - -Here is a simple example of an applet which combines both OpenGL -rendering and OpenAL audio: - -</P> -<P> - -<applet code="org.jdesktop.applet.util.JNLPAppletLauncher" - width=600 - height=400 - archive="http://jogamp.org/deployment/util/applet-launcher.jar, - http://jogamp.org/deployment/webstart/newt.all.jar, - http://jogamp.org/deployment/webstart/nativewindow.all.jar, - http://jogamp.org/deployment/webstart/jogl.all.jar, - http://jogamp.org/deployment/webstart/gluegen-rt.jar, - http://jogamp.org/deployment/webstart/jogl-demos/jogl-demos.jar, - http://jogamp.org/deployment/webstart/joal.jar, - <param name="codebase_lookup" value="false"> - <param name="subapplet.classname" VALUE="demos.applets.GearsJOALApplet"> - <param name="subapplet.displayname" VALUE="JOGL / JOAL Gears Applet"> - <param name="noddraw.check" value="true"> - <param name="progressbar" value="true"> - <param name="jnlpNumExtensions" value="2"> - <param name="jnlpExtension1" - value="http://jogamp.org/deployment/webstart/jogl-core.jnlp"> - <param name="jnlpExtension2" - value="http://jogamp.org/deployment/webstart/joal.jnlp"> -</applet> - - -</P> -<P> - -The applet above is instantiated with the following code: - -<pre> -<applet code="org.jdesktop.applet.util.JNLPAppletLauncher" - width=600 - height=400 - archive="http://jogamp.org/deployment/util/applet-launcher.jar, - http://jogamp.org/deployment/webstart/jogl.all.jar, - http://jogamp.org/deployment/webstart/gluegen-rt.jar, - http://jogamp.org/deployment/webstart/jogl-demos/jogl-demos.jar, - http://jogamp.org/deployment/webstart/joal.jar, - http://jogamp.org/deployment/webstart/joal-demos/joal-demos.jar"> - <param name="codebase_lookup" value="false"> - <param name="subapplet.classname" VALUE="demos.applets.GearsJOALApplet"> - <param name="subapplet.displayname" VALUE="JOGL / JOAL Gears Applet"> - <param name="noddraw.check" value="true"> - <param name="progressbar" value="true"> - <param name="jnlpNumExtensions" value="2"> - <param name="jnlpExtension1" - value="http://jogamp.org/deployment/webstart/jogl-core.jnlp"> - <param name="jnlpExtension2" - value="http://jogamp.org/deployment/webstart/joal.jnlp"> -</applet> -</pre> - -</P> -<P> - -Note that the jogl-demos.jar and joal-demos.jar files, which contain -the applet's classes, <B>do not need to be signed</B>! Sun -Microsystems, Inc. signs applet-launcher.jar, jogl.jar, joal.jar and -gluegen-rt.jar, which contain the JNLPAppletLauncher, JOGL, JOAL and -supporting classes; this is the only Java code which needs to be -signed in order to deploy applets using JOGL and JOAL and is the only -certificate the end user must accept. - -</P> -<P> - -The <a href="http://jogamp.org/applet-launcher/www/">JNLPAppletLauncher -home page</a> contains more information about what files must be -placed on the web server in order to enable the deployment of applets -using JOGL and other extensions. - -</P> - -</body> -</html> diff --git a/www/applettest-next.html b/www/applettest-next.html deleted file mode 100644 index 1571fd1..0000000 --- a/www/applettest-next.html +++ /dev/null @@ -1,33 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html> -<head> -<title>JOGL Applet Test - Next JOGL Version</title> -</head> -<body> - -<P> - -<applet code="org.jdesktop.applet.util.JNLPAppletLauncher" - width=600 - height=400 - archive="http://jogamp.org/deployment/util/applet-launcher.jar, - http://jogamp.org/deployment/webstart-next/newt.all.jar, - http://jogamp.org/deployment/webstart-next/nativewindow.all.jar, - http://jogamp.org/deployment/webstart-next/jogl.all.jar, - http://jogamp.org/deployment/webstart-next/gluegen-rt.jar, - http://jogamp.org/deployment/webstart-next/jogl-demos/jogl-demos.jar"> - <param name="codebase_lookup" value="false"> - <param name="subapplet.classname" value="demos.applets.GearsApplet"> - <param name="subapplet.displayname" value="JOGL Gears Applet"> - <param name="noddraw.check" value="true"> - <param name="progressbar" value="true"> - <param name="jnlpNumExtensions" value="1"> - <param name="jnlpExtension1" - value="http://jogamp.org/deployment/webstart-next/jogl-core.jnlp"> -</applet> - - -</P> - -</body> -</html> diff --git a/www/applettest.html b/www/applettest.html deleted file mode 100644 index 724f42f..0000000 --- a/www/applettest.html +++ /dev/null @@ -1,88 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html> -<head> -<title>JOGL Applet Test</title> -</head> -<body> - -<P> - -The new <a -href="http://jogamp.org/applet-launcher/www/">JNLPAppletLauncher</a> -enables the creation and deployment of applets using 3D graphics via -OpenGL without requiring the applet to be signed or performing any -manual installation of software on users' computers. It has been -tested and should work on any OS/CPU combination supported by JOGL -with a Java Runtime Environment version 1.4.2 or later installed into -the web browser. Here is an example of the standard Gears demo running -as an applet: - -</P> -<P> - -<applet code="org.jdesktop.applet.util.JNLPAppletLauncher" - width=600 - height=400 - archive="http://jogamp.org/deployment/util/applet-launcher.jar, - http://jogamp.org/deployment/webstart/newt.all.jar, - http://jogamp.org/deployment/webstart/jogl.all.jar, - http://jogamp.org/deployment/webstart/nativewindow.all.jar, - http://jogamp.org/deployment/webstart/gluegen-rt.jar, - http://jogamp.org/deployment/webstart/jogl-demos/jogl-demos.jar"> - <param name="codebase_lookup" value="false"> - <param name="subapplet.classname" value="demos.applets.GearsApplet"> - <param name="subapplet.displayname" value="JOGL Gears Applet"> - <param name="noddraw.check" value="true"> - <param name="progressbar" value="true"> - <param name="jnlpNumExtensions" value="1"> - <param name="jnlpExtension1" - value="http://jogamp.org/deployment/webstart/jogl-core.jnlp"> -</applet> - -</P> -<P> - -The applet above is instantiated with the following code: - -<pre> -<applet code="org.jdesktop.applet.util.JNLPAppletLauncher" - width=600 - height=400 - archive="http://jogamp.org/deployment/util/applet-launcher.jar, - http://jogamp.org/deployment/webstart/nativewindow.all.jar, - http://jogamp.org/deployment/webstart/jogl.all.jar, - http://jogamp.org/deployment/webstart/gluegen-rt.jar, - http://jogamp.org/deployment/webstart/jogl-demos/jogl-demos.jar"> - <param name="codebase_lookup" value="false"> - <param name="subapplet.classname" value="demos.applets.GearsApplet"> - <param name="subapplet.displayname" value="JOGL Gears Applet"> - <param name="noddraw.check" value="true"> - <param name="progressbar" value="true"> - <param name="jnlpNumExtensions" value="1"> - <param name="jnlpExtension1" - value="http://jogamp.org/deployment/webstart/jogl-core.jnlp"> -</applet> -</pre> - -</P> -<P> - -Note that the jogl-demos.jar, which contains the GearsApplet class, -<B>does not need to be signed</B>! JogAmp Community signs -applet-launcher.jar, jogl.jar and gluegen-rt.jar, which contain the -JNLPAppletLauncher and JOGL's supporting classes; this is the only -Java code which needs to be signed in order to deploy applets using -JOGL and is the only certificate the end user must accept. - -</P> -<P> - -The <a href="http://jogamp.org/applet-launcher/www/">JNLPAppletLauncher -home page</a> contains more information about what files must be -placed on the web server in order to enable the deployment of applets -using JOGL and other extensions. - -</P> - -</body> -</html> diff --git a/www/index.html b/www/index.html index 66bd403..8ef3a02 100644 --- a/www/index.html +++ b/www/index.html @@ -15,10 +15,14 @@ <div id="menu"> <ul> <li><a href="http://jogamp.org/">Home</a></li> - <li><a href="../../joal/www">JOAL</a></li> - <li><a href="../../jocl/www">JOCL</a></li> <li><a href="../../jogl/www">JOGL</a></li> - <li><a href="../../wiki/index.php/Jogl_FAQ">Wiki</a></li> + <li><a href="../../deployment/jogamp-current/jogl-test-applets.html">Tests</a></li> + <li><a href="../../deployment/jogamp-next/javadoc/jogl/javadoc/">JavaDoc</a></li> + <li><a href="../../joal/www">JOAL</a></li> + <li><a href="../../jocl/www">JOCL</a></li> + <li><a href="../../wiki/">Wiki</a></li> + <li><a href="../../blog/">Blogs</a></li> + <li><a href="http://forum.jogamp.org/" target="_blank">Forum</a></li> </ul> </div> <div id="main"> @@ -33,10 +37,10 @@ <ul> <li><a href="../../wiki/index.php/Jogl_Tutorial">JOGL Tutorial</a></li> <li><a href="../doc/readme.html">Demo Documentation</a></li> - <li><a href="applettest-jnlp.html">JOGL JNLP Applet test incl. Applet-Launcher fallback</a></li> - <li><a href="applettest.html">JOGL Applet-Launcher only test</a></li> - <li><a href="../../deployment/webstart/jogl-demos/applet-gearsjoal-jnlp.html">JOGL / JOAL JNLP Applet</a></li> - <li><a href="applettest-joal.html">JOGL / JOAL Applet-Launcher only test</a></li> + <li><a href="../../deployment/jogamp-current/jogl-demos/applet-gears.html">JOGL JNLP Applet test incl. Applet-Launcher fallback</a></li> + <li><a href="../../deployment/jogamp-current/jogl-demos/applet-gears-launcheronly.html">JOGL Applet-Launcher only test</a></li> + <li><a href="../../deployment/jogamp-current/jogl-demos/applet-gearsjoal.html">JOGL / JOAL JNLP Applet</a></li> + <li><a href="../../deployment/jogamp-current/jogl-demos/applet-gearsjoal-launcheronly.html">JOGL / JOAL Applet-Launcher only test</a></li> <li><a href="http://ak.kiet.le.googlepages.com/theredbookinjava.html">OpenGL Red Book examples using JOGL</a></li> <li><a href="http://pepijn.fab4.be/software/nehe-java-ports/">NeHe examples ported to JOGL</a></li> <!-- @@ -87,26 +91,28 @@ click the images to launch the demos. Where there are no hardware or operating system requirements listed, the demos run on any vendor's graphics card - and on any of Solaris/SPARC, Solaris/x86, Linux/x86, Windows/x86, and - Macintosh OS X 10.3.<br/> + and on any of Solaris/x86, Linux/x86, Windows/x86, and Macintosh OS X 10.5. </p> - <p> It is now possible to deploy unsigned applets using JOGL with no - manual installation of any software on the end user's machine! Please - see the following test pages for more information:</p> + Applets using JOGL can be deployed without signing your own code and without + manual installation of any software on the end user's machine: <ul> - <li><a href="applettest-jnlp.html">JNLP Applet test page (standard JNLP - Applet with Applet-Launcher fallback)</a></li> - <li><a href="applettest.html">Applet-Launcher only test page (pls use - variant above)</a></li> - <li><a href="#NEWTAWTJNLPApplets">Simple NEWT JNLP AWT Applet's</a></li> + <li><a href="../../deployment/jogamp-current/jogl-test-applets.html">JOGL Applet Tests</a> + (<a href="../../deployment/jogamp-next/jogl-test-applets.html"><i>next version</i></a>)</li> + <li>JNLP Applet with Applet-Launcher fallback: <a href="../../deployment/jogamp-current/jogl-demos/applet-gears.html">Gears</a>, <a href="../../deployment/jogamp-current/jogl-demos/applet-gearsjoal.html">Gears w/ JOAL</a></li> + <li>Applet-Launcher Only: <a href="../../deployment/jogamp-current/jogl-demos/applet-gears-launcheronly.html">Gears</a>, <a href="../../deployment/jogamp-current/jogl-demos/applet-gearsjoal-launcheronly.html">Gears w/ JOAL</a></li> + <li>Simple Applet w/ auto native JAR loading, using <i>Applets Runner</i> <a href="../../deployment/jogamp-next/javadoc/jogl/javadoc/com/jogamp/newt/awt/applet/JOGLNewtApplet1Run.html">JOGLNewtApplet1Run</a> and <a href="../../jogl/doc/NEWT-Overview.html">NEWT</a>: <a href="../../deployment/jogamp-current/jogl-demos/jogl-newt-applet-runner-cube.html">Cube</a>, <a href="../../deployment/jogamp-current/jogl-demos/jogl-newt-applet-runner-fbcubes.html">FBO Cubes</a>, <a href="../../deployment/jogamp-current/jogl-demos/jogl-newt-applet-runner-angelesgl2es1.html">Angeles</a>, <a href="../../deployment/jogamp-current/jogl-demos/jogl-newt-applet-runner-gears.html">Gears</a></li> + <li><a href="../../deployment/jogamp-current/jogl-demos/test.html">Plain test page</a> + (<a href="../../deployment/jogamp-next/jogl-demos/test.html"><i>next version</i></a>)</li> </ul> - <p><a href="test.html"">Launch test</a> with the webstart-next version. - </p> + <p> - Quick Version Info [ <a href="../../deployment/webstart/applet-version-jnlp.html">Applet</a>, - <a href="../../deployment/webstart/application-version.jnlp">Application</a> ] + Quick Version Info: Current [ <a href="../../deployment/jogamp-current/jogl-applet-version.html">Applet</a>, + <a href="../../deployment/jogamp-current/jogl-application-version.jnlp">Application</a> ], + Next [ <a href="../../deployment/jogamp-next/jogl-applet-version.html">Applet</a>, + <a href="../../deployment/jogamp-next/jogl-application-version.jnlp">Application</a> ]. </p> + <p>The source code for these demonstrations is available via <a href="http://jogamp.org/wiki/index.php/Jogl_FAQ#Get_the_Source_Code">GIT</a>.<br/> </p> @@ -140,7 +146,7 @@ </tr> <tr> <td width="25%"> - <a href="http://jogamp.org/deployment/webstart/jogl-demos/Gears.jnlp"> + <a href="http://jogamp.org/deployment/jogamp-current/jogl-demos/Gears.jnlp"> <img src="gears_sm.jpg" width="160" height="163" alt="Launch Gears demo"/> </a> </td> @@ -244,7 +250,7 @@ </tr> <tr> <td width="25%"> - <a href="http://jogamp.org/deployment/webstart/jogl-demos/HWShadowmapsSimple.jnlp"> + <a href="http://jogamp.org/deployment/jogamp-current/jogl-demos/HWShadowmapsSimple.jnlp"> <img src="shadowmaps_sm.jpg" width="160" height="160" alt="Launch Hardware Shadow Mapping demo"/> </a> </td> @@ -297,7 +303,7 @@ </tr> <tr> <td width="25%"> - <a href="http://jogamp.org/deployment/webstart/jogl-demos/HDR.jnlp"> + <a href="http://jogamp.org/deployment/jogamp-current/jogl-demos/HDR.jnlp"> <img src="hdr_sm.jpg" width="160" height="120" alt="Launch High Dynamic Range Rendering demo"/> </a> </td> @@ -358,7 +364,7 @@ </tr> <tr> <td width="25%"> - <a href="http://jogamp.org/deployment/webstart/jogl-demos/InfiniteShadowVolumes.jnlp"> + <a href="http://jogamp.org/deployment/jogamp-current/jogl-demos/InfiniteShadowVolumes.jnlp"> <img src="shadowvolumes_sm.jpg" width="160" height="161" alt="Launch Infinite Shadow Volumes demo"/> </a> </td> @@ -410,7 +416,7 @@ </tr> <tr> <td width="25%"> - <a href="http://jogamp.org/deployment/webstart/jogl-demos/JRefractNoOGL.jnlp"> + <a href="http://jogamp.org/deployment/jogamp-current/jogl-demos/JRefractNoOGL.jnlp"> <img src="jrefract_sm.jpg" width="160" height="120" alt="Launch JRefract demo"/> </a> </td> @@ -421,7 +427,7 @@ href="http://developer.nvidia.com/object/sdk_home.html">SDK</a>. <p> If running on <a href="https://mustang.dev.java.net/">Java SE 6 (Mustang)</a>, - try the <a href="http://jogamp.org/deployment/webstart/jogl-demos/JRefract.jnlp">fully + try the <a href="http://jogamp.org/deployment/jogamp-current/jogl-demos/JRefract.jnlp">fully OpenGL-accelerated version</a> of this demo using the new <a href="http://192.18.37.44/forums/index.php?topic=10813.0">Java2D/JOGL interoperability</a> support!</p> @@ -469,7 +475,7 @@ </tr> <tr> <td width="25%"><a - href="http://jogamp.org/deployment/webstart/jogl-demos/ParticleEngine.jnlp"> + href="http://jogamp.org/deployment/jogamp-current/jogl-demos/ParticleEngine.jnlp"> <img src="particles_sm.jpg" width="160" height="129" alt="Launch Particle Engine demo"/> @@ -520,7 +526,7 @@ </tr> <tr> <td width="25%"><a - href="http://jogamp.org/deployment/webstart/jogl-demos/TestTextRenderer.jnlp"> + href="http://jogamp.org/deployment/jogamp-current/jogl-demos/TestTextRenderer.jnlp"> <img src="testtext_sm.jpg" width="160" height="152" alt="Launch TestTextRenderer demo"/> @@ -571,7 +577,7 @@ </tr> <tr> <td width="25%"><a - href="http://jogamp.org/deployment/webstart/jogl-demos/FlyingText.jnlp"> + href="http://jogamp.org/deployment/jogamp-current/jogl-demos/FlyingText.jnlp"> <img src="flyingtext_sm.jpg" width="160" height="160" alt="Launch FlyingText demo"/> @@ -622,7 +628,7 @@ </tr> <tr> <td width="25%"><a - href="http://jogamp.org/deployment/webstart/jogl-demos/CustomText.jnlp"> + href="http://jogamp.org/deployment/jogamp-current/jogl-demos/CustomText.jnlp"> <img src="customtext_sm.jpg" width="160" height="160" alt="Launch CustomText demo"/> @@ -673,7 +679,7 @@ </tr> <tr> <td width="25%"><a - href="http://jogamp.org/deployment/webstart/jogl-demos/TextFlow.jnlp"> + href="http://jogamp.org/deployment/jogamp-current/jogl-demos/TextFlow.jnlp"> <img src="textflow_sm.jpg" width="160" height="147" alt="Launch TextFlow demo"/> </a></td> @@ -723,7 +729,7 @@ </tr> <tr> <td width="25%"><a - href="http://jogamp.org/deployment/webstart/jogl-demos/TextCube.jnlp"> + href="http://jogamp.org/deployment/jogamp-current/jogl-demos/TextCube.jnlp"> <img src="textcube_sm.jpg" width="160" height="176" alt="Launch TextCube demo"/> </a></td> @@ -773,7 +779,7 @@ </tr> <tr> <td width="25%"><a - href="http://jogamp.org/deployment/webstart/jogl-demos/VertexProgWarp.jnlp"> + href="http://jogamp.org/deployment/jogamp-current/jogl-demos/VertexProgWarp.jnlp"> <img src="warp_sm.jpg" width="160" height="142" alt="Launch Vertex Prog Warp demo"/> </a></td> @@ -827,7 +833,7 @@ </tr> <tr> <td width="25%"><a - href="http://jogamp.org/deployment/webstart/jogl-demos/VertexProgRefract.jnlp"> + href="http://jogamp.org/deployment/jogamp-current/jogl-demos/VertexProgRefract.jnlp"> <img src="refract_sm.jpg" width="160" height="161" alt="Launch Vertex Prog Refract demo"/> </a></td> @@ -882,7 +888,7 @@ </tr> <tr> <td width="25%"><a - href="http://jogamp.org/deployment/webstart/jogl-demos/ProceduralTexturePhysics.jnlp"> + href="http://jogamp.org/deployment/jogamp-current/jogl-demos/ProceduralTexturePhysics.jnlp"> <img src="water_sm.jpg" width="160" height="160" alt="Launch Procedural Texture Physics demo"/> </a></td> @@ -935,7 +941,7 @@ </tr> <tr> <td width="25%"> - <a href="http://jogamp.org/deployment/webstart/jogl-demos/XTrans.jnlp"> + <a href="http://jogamp.org/deployment/jogamp-current/jogl-demos/XTrans.jnlp"> <img src="xtrans_sm.jpg" width="160" height="130" alt="Launch XTrans demo"/> </a> </td> @@ -990,7 +996,7 @@ </tr> <tr> <td width="25%"> - <a href="http://jogamp.org/deployment/webstart/jogl-demos/VertexBufferObject.jnlp"> + <a href="http://jogamp.org/deployment/jogamp-current/jogl-demos/VertexBufferObject.jnlp"> <img src="VertexArrayRange_sm.jpg" width="160" height="164" alt="Launch Vertex Buffer Object demo"/> </a> </td> @@ -1014,42 +1020,6 @@ </tr> </tbody> </table> - <a name="NEWTAWTJNLPApplets"/> - <table border="0" cellpadding="5" cellspacing="1" width="100%"> - <tbody> - <tr> - <td> - <table border="0" cellpadding="5" - cellspacing="1" width="100%"> - <tbody> - <tr> - <td valign="top"> - <div align="left"><strong>Simple NEWT JNLP AWT Applet's</strong> - </div> - </td> - </tr> - <tr> - <td valign="top" bgcolor="#ffffff"> - <a href="http://jogamp.org/deployment/webstart/jogl-demos/jogl-newt-applet-runner-cube.html"> - GL2ES1 Cube - </a><br/> - <a href="http://jogamp.org/deployment/webstart/jogl-demos/jogl-newt-applet-runner-fbcubes.html"> - GL2ES1 FBO Cubes - </a><br/> - <a href="http://jogamp.org/deployment/webstart/jogl-demos/jogl-newt-applet-runner-angelesgl2es1.html"> - GL2ES1 Angeles - </a><br/> - <a href="http://jogamp.org/deployment/webstart/jogl-demos/jogl-newt-applet-runner-gears.html"> - GL2 Gears - </a><br/> - </td> - </tr> - </tbody> - </table> - </td> - </tr> - </tbody> - </table> </div> </div> <div id="footer"> diff --git a/www/test.html b/www/test.html deleted file mode 100644 index d0fd9a0..0000000 --- a/www/test.html +++ /dev/null @@ -1,43 +0,0 @@ -<H2> Test page for JOGL demos </H2> -<p> - -<H3> Version </H3> -<a href="../../deployment/webstart/applet-version-jnlp.html">Applet</a><br> -<a href="../../deployment/webstart/application-version.jnlp">Application</a><br> - -<H3> AWT JNLP Applet test with Applet Launcher fallback </H3> -<a href="applettest-jnlp-next.html">JNLP Applet test</a><br> -<a href="applettest-next.html">Applet Launcher test</a><br> -<p> -<H3> AWT JNLP Applet's using NEWT/AWT </H3> -<a href="http://jogamp.org/deployment/webstart-next/jogl-demos/jogl-newt-applet-runner-gears.html">AWT Applet JOGL/NEWT GL2 Gears</a><br> -<a href="http://jogamp.org/deployment/webstart-next/jogl-demos/jogl-newt-applet-runner-cube.html">AWT Applet JOGL/NEWT GL2ES1 Cube</a><br> -<a href="http://jogamp.org/deployment/webstart-next/jogl-demos/jogl-newt-applet-runner-fbcubes.html">AWT Applet JOGL/NEWT GL2ES1 FBO Cubes</a><br> -<a href="http://jogamp.org/deployment/webstart-next/jogl-demos/jogl-newt-applet-runner-angelesgl2es1.html">AWT Applet JOGL/NEWT GL2ES1 Angeles</a><br> -<p> -<H3> JNLP Applet2's using native NEWT </H3> -Coming up .. -<p> -<H3> JNLP Launcher .. </H3> -<a href="http://jogamp.org/deployment/webstart-next/jogl-demos/Gears.jnlp">Gears</a><br> -<a href="http://jogamp.org/deployment/webstart-next/jogl-demos/HWShadowmapsSimple.jnlp">Hardware Shadow Maps</a><br> -<a href="http://jogamp.org/deployment/webstart-next/jogl-demos/HDR.jnlp">HDR</a><br> -<a href="http://jogamp.org/deployment/webstart-next/jogl-demos/InfiniteShadowVolumes.jnlp">Infinite Shadow Volumes</a><br> -<a href="http://jogamp.org/deployment/webstart-next/jogl-demos/JRefractNoOGL.jnlp">JRefract</a><br> -<a href="http://jogamp.org/deployment/webstart-next/jogl-demos/JRefract.jnlp">JRefract with Java2D/JOGL Bridge (Java SE 6 only)</a><br> -<a href="http://jogamp.org/deployment/webstart-next/jogl-demos/ParticleEngine.jnlp">Particle Engine</a><br> -<a href="http://jogamp.org/deployment/webstart-next/jogl-demos/TestTextRenderer.jnlp">Text Renderer Test</a><br> -<a href="http://jogamp.org/deployment/webstart-next/jogl-demos/FlyingText.jnlp">Flying Text</a><br> -<a href="http://jogamp.org/deployment/webstart-next/jogl-demos/TextFlow.jnlp">Text Flow</a><br> -<a href="http://jogamp.org/deployment/webstart-next/jogl-demos/TextCube.jnlp">Text Cube</a><br> -<a href="http://jogamp.org/deployment/webstart-next/jogl-demos/VertexProgWarp.jnlp">Vertex Prog Warp</a><br> -<a href="http://jogamp.org/deployment/webstart-next/jogl-demos/VertexProgRefract.jnlp">Vertex Prog Refract</a><br> -<a href="http://jogamp.org/deployment/webstart-next/jogl-demos/ProceduralTexturePhysics.jnlp">Water</a><br> -<a href="http://jogamp.org/deployment/webstart-next/jogl-demos/XTrans.jnlp">XTrans (Java SE 6 only)</a><br> -<a href="http://jogamp.org/deployment/webstart-next/jogl-demos/VertexBufferObject.jnlp">Vertex Buffer Object</a><br> -<a href="http://jogamp.org/deployment/webstart-next/jogl-demos/VertexArrayRange.jnlp">Vertex Array Range</a><br> -<a href="http://jogamp.org/deployment/webstart-next/jogl-demos/WorldWindBasicDemo.jnlp">NASA World Wind Java (version hosted by NASA)</a><br> -<a href="http://jogamp.org/deployment/webstart-next/jogl-demos/worldwind.jnlp">NASA World Wind Java (older version copied from NASA)</a><br> -<p> -<H3> JOAL test (broken).. </H3> -<a href="applettest-joal-next.html">JOGL/JOAL Applet test</a><br> |