From a393e45613d87101dbb13763df263c2f9291d2d0 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 26 Jun 2012 10:44:08 +0200 Subject: Implement Bug #598 - JOGL ALL JAR File Change incl. it's Native Jar URL Derivation - Depends on GlueGen commit 9a71703904ebfec343fb2c7266343d37a2e4c3db JAR file name changes: ALL JARs: - jogl.all.jar -> jogl-all.jar - jogl.all-noawt.jar -> jogl-all-noawt.jar - jogl.all-mobile.jar -> jogl-all-mobile.jar - jogl.all-android.jar -> jogl-all-android.jar - jogl.all-android.apk -> jogl-all-android.apk Atomic JARs: - nativewindow.core.jar -> nativewindow-core.jar - nativewindow.awt.jar -> nativewindow-awt.jar - nativewindow.os.x11.jar -> nativewindow-os-x11.jar - nativewindow.os.win.jar -> nativewindow-os-win.jar - nativewindow.os.macosx.jar -> nativewindow-os-osx.jar - jogl.core.jar -> jogl-core.jar - jogl.sdk.jar -> jogl-sdk.jar - jogl.glmobile.jar -> jogl-glmobile.jar - jogl.glmobile.dbg.jar -> jogl-glmobile-dbg.jar - jogl.util.jar -> jogl-util.jar - jogl.glutess.jar -> jogl-glutess.jar - jogl.glumipmap.jar -> jogl-glumipmap.jar - jogl.util.fixedfuncemu.jar -> jogl-util-fixedfuncemu.jar - jogl.awt.jar -> jogl-awt.jar - jogl.swt.jar -> jogl-swt.jar - jogl.util.awt.jar -> jogl-util-awt.jar - jogl.os.x11.jar -> jogl-os-x11.jar - jogl.os.win.jar -> jogl-os-win.jar - jogl.os.osx.jar -> jogl-os-osx.jar - jogl.os.android.jar -> jogl-os-android.jar - jogl.gldesktop.jar -> jogl-gldesktop.jar - jogl.gldesktop.dbg.jar -> jogl-gldesktop-dbg.jar - jogl.glugldesktop.jar -> jogl-glu-gldesktop.jar - jogl.util.gldesktop.jar -> jogl-util-gldesktop.jar - jogl.omx.jar -> jogl-omx.jar - jogl.cg.jar -> jogl-cg.jar - newt.core.jar -> newt-core.jar - newt.ogl.jar -> newt-ogl.jar - newt.awt.jar -> newt-awt.jar - newt.event.jar -> newt-event.jar - newt.driver.x11.jar -> newt-driver-x11.jar - newt.driver.win.jar -> newt-driver-win.jar - newt.driver.macosx.jar -> newt-driver-osx.jar - newt.driver.android.jar -> newt-driver-android.jar - newt.driver.kd.jar -> newt-driver-kd.jar - newt.driver.intelgdl.jar -> newt-driver-intelgdl.jar - newt.driver.broadcomegl.jar -> newt-driver-broadcomegl.jar Test JARs: - jogl.test.jar -> jogl-test.jar - jogl.test-android.jar -> jogl-test-android.jar - jogl.test-android.apk -> jogl-test-android.apk --- jnlp-files/atomic/jogl-awt.jnlp | 54 +++++++++++----------- jnlp-files/atomic/jogl-noawt.jnlp | 50 ++++++++++---------- jnlp-files/atomic/nativewindow-awt.jnlp | 19 +++++++- jnlp-files/atomic/nativewindow-noawt.jnlp | 30 ++++++------ jnlp-files/atomic/newt-awt-jogl.jnlp | 36 +++++++-------- jnlp-files/atomic/newt-awt.jnlp | 34 +++++++------- jnlp-files/atomic/newt-noawt-jogl.jnlp | 36 +++++++-------- jnlp-files/atomic/newt-noawt.jnlp | 30 ++++++------ jnlp-files/jogl-all-awt-cg.jnlp | 36 +++++++-------- jnlp-files/jogl-all-awt.jnlp | 2 +- jnlp-files/jogl-all-mobile.jnlp | 2 +- jnlp-files/jogl-all-noawt.jnlp | 2 +- ...nner-newt-ElektronenMultiplizierer-napplet.html | 8 ++-- ...pplet-runner-newt-ElektronenMultiplizierer.html | 8 ++-- ...applet-runner-newt-GraphTextDemo01-napplet.html | 8 ++-- .../jogl-applet-runner-newt-GraphTextDemo01.html | 8 ++-- ...let-runner-newt-GraphUISceneDemo01-napplet.html | 8 ++-- ...jogl-applet-runner-newt-GraphUISceneDemo01.html | 8 ++-- .../jogl-applet-runner-newt-MovieCube-napplet.html | 8 ++-- jnlp-files/jogl-applet-runner-newt-MovieCube.html | 8 ++-- ...plet-runner-newt-gears-normal-launcheronly.html | 16 +++---- ...gl-applet-runner-newt-gears-normal-napplet.html | 18 ++++---- ...l-applet-runner-newt-gears-normal-napplet2.html | 18 ++++---- .../jogl-applet-runner-newt-gears-normal.html | 20 ++++---- ...l-applet-runner-newt-gears-special-napplet.html | 8 ++-- .../jogl-applet-runner-newt-gears-special.html | 8 ++-- jnlp-files/jogl-applet-runner-newt.jnlp | 2 +- jnlp-files/jogl-applet-version-lancheronly.html | 4 +- jnlp-files/jogl-applet-version-napplet.html | 8 ++-- jnlp-files/jogl-applet-version.html | 4 +- 30 files changed, 261 insertions(+), 240 deletions(-) (limited to 'jnlp-files') diff --git a/jnlp-files/atomic/jogl-awt.jnlp b/jnlp-files/atomic/jogl-awt.jnlp index a33eb35a6..8f15a6c58 100644 --- a/jnlp-files/atomic/jogl-awt.jnlp +++ b/jnlp-files/atomic/jogl-awt.jnlp @@ -14,83 +14,83 @@ - - - - - - - - - - - + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/jnlp-files/atomic/jogl-noawt.jnlp b/jnlp-files/atomic/jogl-noawt.jnlp index 3463a1965..91a1fe89b 100644 --- a/jnlp-files/atomic/jogl-noawt.jnlp +++ b/jnlp-files/atomic/jogl-noawt.jnlp @@ -14,81 +14,81 @@ - - - - - - - - - + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/jnlp-files/atomic/nativewindow-awt.jnlp b/jnlp-files/atomic/nativewindow-awt.jnlp index db80b644f..a993ab14a 100644 --- a/jnlp-files/atomic/nativewindow-awt.jnlp +++ b/jnlp-files/atomic/nativewindow-awt.jnlp @@ -14,57 +14,72 @@ - - + + + + + + + + + + + + + + + + + diff --git a/jnlp-files/atomic/nativewindow-noawt.jnlp b/jnlp-files/atomic/nativewindow-noawt.jnlp index fed731042..5cd4872dc 100644 --- a/jnlp-files/atomic/nativewindow-noawt.jnlp +++ b/jnlp-files/atomic/nativewindow-noawt.jnlp @@ -14,68 +14,72 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + diff --git a/jnlp-files/atomic/newt-awt-jogl.jnlp b/jnlp-files/atomic/newt-awt-jogl.jnlp index 69406e43c..0a43128bb 100644 --- a/jnlp-files/atomic/newt-awt-jogl.jnlp +++ b/jnlp-files/atomic/newt-awt-jogl.jnlp @@ -14,50 +14,50 @@ - - - + + + - + - + - + - + - + - + - + - + - + - + @@ -65,23 +65,23 @@ - + - + - + - + - + diff --git a/jnlp-files/atomic/newt-awt.jnlp b/jnlp-files/atomic/newt-awt.jnlp index 26e45e3fc..6e46b82a4 100644 --- a/jnlp-files/atomic/newt-awt.jnlp +++ b/jnlp-files/atomic/newt-awt.jnlp @@ -14,71 +14,73 @@ - - + + - + - + - + - + - + - + - + - + - + - + - + - + + + - + - + diff --git a/jnlp-files/atomic/newt-noawt-jogl.jnlp b/jnlp-files/atomic/newt-noawt-jogl.jnlp index ced8b29c7..5b671edcd 100644 --- a/jnlp-files/atomic/newt-noawt-jogl.jnlp +++ b/jnlp-files/atomic/newt-noawt-jogl.jnlp @@ -14,73 +14,73 @@ - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/jnlp-files/atomic/newt-noawt.jnlp b/jnlp-files/atomic/newt-noawt.jnlp index 1616dff88..1161d7a9c 100644 --- a/jnlp-files/atomic/newt-noawt.jnlp +++ b/jnlp-files/atomic/newt-noawt.jnlp @@ -14,56 +14,56 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -73,11 +73,11 @@ - + - + diff --git a/jnlp-files/jogl-all-awt-cg.jnlp b/jnlp-files/jogl-all-awt-cg.jnlp index 18f8f498e..24c22c290 100644 --- a/jnlp-files/jogl-all-awt-cg.jnlp +++ b/jnlp-files/jogl-all-awt-cg.jnlp @@ -14,75 +14,75 @@ - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/jnlp-files/jogl-all-awt.jnlp b/jnlp-files/jogl-all-awt.jnlp index 55ae21d2a..4e05f8dac 100644 --- a/jnlp-files/jogl-all-awt.jnlp +++ b/jnlp-files/jogl-all-awt.jnlp @@ -14,7 +14,7 @@ - + diff --git a/jnlp-files/jogl-all-mobile.jnlp b/jnlp-files/jogl-all-mobile.jnlp index 5f96137c2..43b9b3b09 100644 --- a/jnlp-files/jogl-all-mobile.jnlp +++ b/jnlp-files/jogl-all-mobile.jnlp @@ -14,7 +14,7 @@ - + diff --git a/jnlp-files/jogl-all-noawt.jnlp b/jnlp-files/jogl-all-noawt.jnlp index 63f558d38..eed6749c1 100644 --- a/jnlp-files/jogl-all-noawt.jnlp +++ b/jnlp-files/jogl-all-noawt.jnlp @@ -14,7 +14,7 @@ - + diff --git a/jnlp-files/jogl-applet-runner-newt-ElektronenMultiplizierer-napplet.html b/jnlp-files/jogl-applet-runner-newt-ElektronenMultiplizierer-napplet.html index 3b77157c6..19a3b2965 100644 --- a/jnlp-files/jogl-applet-runner-newt-ElektronenMultiplizierer-napplet.html +++ b/jnlp-files/jogl-applet-runner-newt-ElektronenMultiplizierer-napplet.html @@ -14,8 +14,8 @@ Demoscene Passivist's Elektronen-Multiplizierer width="640" height="480"> + jar/jogl-all.jar, + jar/jogl-test.jar"> @@ -28,8 +28,8 @@ Demoscene Passivist's Elektronen-Multiplizierer 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.test.jar" + jar/jogl-all.jar, + jar/jogl-test.jar" codebase_lookup" value="false" java_arguments="-Dsun.java2d.noddraw=true" gl_event_listener_class="com.jogamp.opengl.test.junit.jogl.demos.es2.ElektronenMultiplizierer" diff --git a/jnlp-files/jogl-applet-runner-newt-ElektronenMultiplizierer.html b/jnlp-files/jogl-applet-runner-newt-ElektronenMultiplizierer.html index 2a500c9e6..71c9baff8 100644 --- a/jnlp-files/jogl-applet-runner-newt-ElektronenMultiplizierer.html +++ b/jnlp-files/jogl-applet-runner-newt-ElektronenMultiplizierer.html @@ -15,8 +15,8 @@ Demoscene Passivist's Elektronen-Multiplizierer + jar/jogl-all.jar, + jar/jogl-test.jar"> @@ -38,8 +38,8 @@ Demoscene Passivist's Elektronen-Multiplizierer pluginspage="http://java.sun.com/javase/downloads/ea.jsp" archive="jar/applet-launcher.jar, jar/gluegen-rt.jar, - jar/jogl.all.jar, - jar/jogl.test.jar" + jar/jogl-all.jar, + jar/jogl-test.jar" codebase_lookup" value="false" subapplet.classname="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run" subapplet.displayname="ElektronenMultiplizierer" diff --git a/jnlp-files/jogl-applet-runner-newt-GraphTextDemo01-napplet.html b/jnlp-files/jogl-applet-runner-newt-GraphTextDemo01-napplet.html index 59115ca36..9648b57da 100644 --- a/jnlp-files/jogl-applet-runner-newt-GraphTextDemo01-napplet.html +++ b/jnlp-files/jogl-applet-runner-newt-GraphTextDemo01-napplet.html @@ -14,8 +14,8 @@ JOGL Graph Text Demo 01 width="800" height="400"> + jar/jogl-all.jar, + jar/jogl-test.jar"> @@ -31,8 +31,8 @@ JOGL Graph Text Demo 01 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.test.jar" + jar/jogl-all.jar, + jar/jogl-test.jar" java_arguments="-Dsun.java2d.noddraw=true" gl_event_listener_class="com.jogamp.opengl.test.junit.graph.demos.GPUTextGLListener0A" gl_profile="GL2ES2" diff --git a/jnlp-files/jogl-applet-runner-newt-GraphTextDemo01.html b/jnlp-files/jogl-applet-runner-newt-GraphTextDemo01.html index 1c7d3472b..489984b4f 100644 --- a/jnlp-files/jogl-applet-runner-newt-GraphTextDemo01.html +++ b/jnlp-files/jogl-applet-runner-newt-GraphTextDemo01.html @@ -15,8 +15,8 @@ JOGL Graph Text Demo 01 + jar/jogl-all.jar, + jar/jogl-test.jar"> @@ -41,8 +41,8 @@ JOGL Graph Text Demo 01 pluginspage="http://java.sun.com/javase/downloads/ea.jsp" archive="jar/applet-launcher.jar, jar/gluegen-rt.jar, - jar/jogl.all.jar, - jar/jogl.test.jar" + jar/jogl-all.jar, + jar/jogl-test.jar" codebase_lookup" value="false" subapplet.classname="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run" subapplet.displayname="JOGL Graph Text Demo01" diff --git a/jnlp-files/jogl-applet-runner-newt-GraphUISceneDemo01-napplet.html b/jnlp-files/jogl-applet-runner-newt-GraphUISceneDemo01-napplet.html index 6efeefc10..8f9783f03 100644 --- a/jnlp-files/jogl-applet-runner-newt-GraphUISceneDemo01-napplet.html +++ b/jnlp-files/jogl-applet-runner-newt-GraphUISceneDemo01-napplet.html @@ -14,8 +14,8 @@ JOGL Graph UI-Scene Demo 01 width="640" height="480"> + jar/jogl-all.jar, + jar/jogl-test.jar"> @@ -30,8 +30,8 @@ JOGL Graph UI-Scene Demo 01 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.test.jar" + jar/jogl-all.jar, + jar/jogl-test.jar" java_arguments="-Dsun.java2d.noddraw=true" gl_event_listener_class="com.jogamp.opengl.test.junit.graph.demos.GPUUISceneGLListener0A" gl_profile="GL2ES2" diff --git a/jnlp-files/jogl-applet-runner-newt-GraphUISceneDemo01.html b/jnlp-files/jogl-applet-runner-newt-GraphUISceneDemo01.html index 6b32b11e7..429e80311 100644 --- a/jnlp-files/jogl-applet-runner-newt-GraphUISceneDemo01.html +++ b/jnlp-files/jogl-applet-runner-newt-GraphUISceneDemo01.html @@ -15,8 +15,8 @@ JOGL Graph UI-Scene Demo 01 + jar/jogl-all.jar, + jar/jogl-test.jar"> @@ -40,8 +40,8 @@ JOGL Graph UI-Scene Demo 01 pluginspage="http://java.sun.com/javase/downloads/ea.jsp" archive="jar/applet-launcher.jar, jar/gluegen-rt.jar, - jar/jogl.all.jar, - jar/jogl.test.jar" + jar/jogl-all.jar, + jar/jogl-test.jar" codebase_lookup" value="false" subapplet.classname="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run" subapplet.displayname="JOGL Graph UI Demo01" diff --git a/jnlp-files/jogl-applet-runner-newt-MovieCube-napplet.html b/jnlp-files/jogl-applet-runner-newt-MovieCube-napplet.html index def7b72b9..f569c7c96 100644 --- a/jnlp-files/jogl-applet-runner-newt-MovieCube-napplet.html +++ b/jnlp-files/jogl-applet-runner-newt-MovieCube-napplet.html @@ -14,8 +14,8 @@ JogAmp's MovieCube - GLMediaPlayer Demo 01 width="510" height="300"> + jar/jogl-all.jar, + jar/jogl-test.jar"> @@ -28,8 +28,8 @@ JogAmp's MovieCube - GLMediaPlayer Demo 01 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.test.jar" + jar/jogl-all.jar, + jar/jogl-test.jar" codebase_lookup" value="false" java_arguments="-Dsun.java2d.noddraw=true" gl_event_listener_class="com.jogamp.opengl.test.junit.jogl.demos.es2.av.MovieCube" diff --git a/jnlp-files/jogl-applet-runner-newt-MovieCube.html b/jnlp-files/jogl-applet-runner-newt-MovieCube.html index 6b1654ed7..7cb00244e 100644 --- a/jnlp-files/jogl-applet-runner-newt-MovieCube.html +++ b/jnlp-files/jogl-applet-runner-newt-MovieCube.html @@ -15,8 +15,8 @@ JogAmp's MovieCube - GLMediaPlayer Demo 01 + jar/jogl-all.jar, + jar/jogl-test.jar"> @@ -38,8 +38,8 @@ JogAmp's MovieCube - GLMediaPlayer Demo 01 pluginspage="http://java.sun.com/javase/downloads/ea.jsp" archive="jar/applet-launcher.jar, jar/gluegen-rt.jar, - jar/jogl.all.jar, - jar/jogl.test.jar" + jar/jogl-all.jar, + jar/jogl-test.jar" codebase_lookup" value="false" subapplet.classname="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run" subapplet.displayname="MovieCube" diff --git a/jnlp-files/jogl-applet-runner-newt-gears-normal-launcheronly.html b/jnlp-files/jogl-applet-runner-newt-gears-normal-launcheronly.html index 91e989346..a9e42d342 100644 --- a/jnlp-files/jogl-applet-runner-newt-gears-normal-launcheronly.html +++ b/jnlp-files/jogl-applet-runner-newt-gears-normal-launcheronly.html @@ -21,8 +21,8 @@ JOGL NEWT JNLP Applet Runner Special Keys:
+ jar/jogl-all.jar, + jar/jogl-test.jar"> @@ -43,8 +43,8 @@ JOGL NEWT JNLP Applet Runner Special Keys:
pluginspage="http://java.sun.com/javase/downloads/ea.jsp" archive="jar/applet-launcher.jar, jar/gluegen-rt.jar, - jar/jogl.all.jar, - jar/jogl.test.jar" + jar/jogl-all.jar, + jar/jogl-test.jar" codebase_lookup" value="false" subapplet.classname="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run" subapplet.displayname="JOGL GearsES2 Applet" @@ -75,8 +75,8 @@ The applet above is instantiated with the following code: <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.test.jar"> + jar/jogl-all.jar, + jar/jogl-test.jar"> <param name="codebase_lookup" value="false"> <param name="subapplet.classname" value="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run"> <param name="subapplet.displayname" value="JOGL GearsES2 Applet"> @@ -97,8 +97,8 @@ The applet above is instantiated with the following code: pluginspage="http://java.sun.com/javase/downloads/ea.jsp" archive="jar/applet-launcher.jar, jar/gluegen-rt.jar, - jar/jogl.all.jar, - jar/jogl.test.jar" + jar/jogl-all.jar, + jar/jogl-test.jar" codebase_lookup" value="false" subapplet.classname="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run" subapplet.displayname="JOGL GearsES2 Applet" diff --git a/jnlp-files/jogl-applet-runner-newt-gears-normal-napplet.html b/jnlp-files/jogl-applet-runner-newt-gears-normal-napplet.html index 9db6d8cc2..37473befe 100644 --- a/jnlp-files/jogl-applet-runner-newt-gears-normal-napplet.html +++ b/jnlp-files/jogl-applet-runner-newt-gears-normal-napplet.html @@ -20,8 +20,8 @@ JOGL NEWT Applet Runner Special Keys:
width="200" height="200"> + jar/jogl-all.jar, + jar/jogl-test.jar"> @@ -34,8 +34,8 @@ JOGL NEWT Applet Runner Special Keys:
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.test.jar" + jar/jogl-all.jar, + jar/jogl-test.jar" java_arguments="-Dsun.java2d.noddraw=true" gl_event_listener_class="com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2" gl_profile="GL2ES2" @@ -58,8 +58,8 @@ The applet above is instantiated with the following code: width="200" height="200"> <param name="code" value="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run"> <param name="archive" value="jar/gluegen-rt.jar, - jar/jogl.all.jar, - jar/jogl.test.jar"> + jar/jogl-all.jar, + jar/jogl-test.jar"> <param name="java_arguments" value="-Dsun.java2d.noddraw=true"> <param name="gl_event_listener_class" value="com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2"> <param name="gl_profile" value="GL2ES2"> @@ -72,8 +72,8 @@ The applet above is instantiated with the following code: 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.test.jar" + jar/jogl-all.jar, + jar/jogl-test.jar" java_arguments="-Dsun.java2d.noddraw=true" gl_event_listener_class="com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2" gl_profile="GL2ES2" @@ -90,7 +90,7 @@ The applet above is instantiated with the following code:

-Note that the jogl.test.jar, which contains the test applet class, +Note that the jogl-test.jar, which contains the test applet class, does not need to be signed! JogAmp Community signs jogl.jar and gluegen-rt.jar, which contain JOGL's supporting classes; this is the only diff --git a/jnlp-files/jogl-applet-runner-newt-gears-normal-napplet2.html b/jnlp-files/jogl-applet-runner-newt-gears-normal-napplet2.html index ba2f69ef4..63df4ed60 100644 --- a/jnlp-files/jogl-applet-runner-newt-gears-normal-napplet2.html +++ b/jnlp-files/jogl-applet-runner-newt-gears-normal-napplet2.html @@ -21,8 +21,8 @@ If Applet is out of browser window, it is closeable. width="200" height="200"> + jar/jogl-all.jar, + jar/jogl-test.jar"> @@ -36,8 +36,8 @@ If Applet is out of browser window, it is closeable. 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.test.jar" + jar/jogl-all.jar, + jar/jogl-test.jar" java_arguments="-Dsun.java2d.noddraw=true" gl_event_listener_class="com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2" gl_profile="GL2ES2" @@ -61,8 +61,8 @@ The applet above is instantiated with the following code: width="200" height="200"> <param name="code" value="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run"> <param name="archive" value="jar/gluegen-rt.jar, - jar/jogl.all.jar, - jar/jogl.test.jar"> + jar/jogl-all.jar, + jar/jogl-test.jar"> <param name="java_arguments" value="-Dsun.java2d.noddraw=true"> <param name="gl_event_listener_class" value="com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2"> <param name="gl_profile" value="GL2ES2"> @@ -76,8 +76,8 @@ The applet above is instantiated with the following code: 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.test.jar" + jar/jogl-all.jar, + jar/jogl-test.jar" java_arguments="-Dsun.java2d.noddraw=true" gl_event_listener_class="com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2" gl_profile="GL2ES2" @@ -95,7 +95,7 @@ The applet above is instantiated with the following code:

-Note that the jogl.test.jar, which contains the test applet class, +Note that the jogl-test.jar, which contains the test applet class, does not need to be signed! JogAmp Community signs jogl.jar and gluegen-rt.jar, which contain JOGL's supporting classes; this is the only diff --git a/jnlp-files/jogl-applet-runner-newt-gears-normal.html b/jnlp-files/jogl-applet-runner-newt-gears-normal.html index c8d654dbc..a6dd16a0c 100644 --- a/jnlp-files/jogl-applet-runner-newt-gears-normal.html +++ b/jnlp-files/jogl-applet-runner-newt-gears-normal.html @@ -35,8 +35,8 @@ JOGL NEWT JNLP Applet Runner Special Keys:
+ jar/jogl-all.jar, + jar/jogl-test.jar"> @@ -58,8 +58,8 @@ JOGL NEWT JNLP Applet Runner Special Keys:
pluginspage="http://java.sun.com/javase/downloads/ea.jsp" archive="jar/applet-launcher.jar, jar/gluegen-rt.jar, - jar/jogl.all.jar, - jar/jogl.test.jar" + jar/jogl-all.jar, + jar/jogl-test.jar" codebase_lookup" value="false" subapplet.classname="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run" subapplet.displayname="JOGL GearsES2 Applet" @@ -91,8 +91,8 @@ The applet above is instantiated with the following code: <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.test.jar"> + jar/jogl-all.jar, + jar/jogl-test.jar"> <param name="codebase_lookup" value="false"> <param name="subapplet.classname" value="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run"> <param name="subapplet.displayname" value="JOGL GearsES2 Applet"> @@ -114,8 +114,8 @@ The applet above is instantiated with the following code: pluginspage="http://java.sun.com/javase/downloads/ea.jsp" archive="jar/applet-launcher.jar, jar/gluegen-rt.jar, - jar/jogl.all.jar, - jar/jogl.test.jar" + jar/jogl-all.jar, + jar/jogl-test.jar" codebase_lookup" value="false" subapplet.classname="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run" subapplet.displayname="JOGL GearsES2 Applet" @@ -154,7 +154,7 @@ Where the referenced JNLP file jogl-applet-runner-newt.jnlp looks as fo <resources> <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/> <property name="sun.java2d.noddraw" value="true"/> - <jar href="jar/jogl.test.jar" main="true"/> + <jar href="jar/jogl-test.jar" main="true"/> <extension name="jogl-all-awt" href="http://jogamp.org/deployment/jogamp-current/jogl-all-awt.jnlp" /> </resources> @@ -170,7 +170,7 @@ Where the referenced JNLP file jogl-applet-runner-newt.jnlp looks as fo

-Note that the jogl.test.jar, which contains the test applet class, +Note that the jogl-test.jar, which contains the test applet class, does not need to be signed! 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 diff --git a/jnlp-files/jogl-applet-runner-newt-gears-special-napplet.html b/jnlp-files/jogl-applet-runner-newt-gears-special-napplet.html index 3c1895b45..7df167844 100644 --- a/jnlp-files/jogl-applet-runner-newt-gears-special-napplet.html +++ b/jnlp-files/jogl-applet-runner-newt-gears-special-napplet.html @@ -11,8 +11,8 @@ JOGL NEWT JNLP Applet Runner Special Keys: width="1" height="1"> + jar/jogl-all.jar, + jar/jogl-test.jar"> @@ -32,8 +32,8 @@ JOGL NEWT JNLP Applet Runner Special Keys: 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.test.jar" + jar/jogl-all.jar, + jar/jogl-test.jar" java_arguments="-Dsun.java2d.noddraw=true" gl_event_listener_class="com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2" gl_profile="GL2ES2" diff --git a/jnlp-files/jogl-applet-runner-newt-gears-special.html b/jnlp-files/jogl-applet-runner-newt-gears-special.html index dcbe898e2..0f5911414 100644 --- a/jnlp-files/jogl-applet-runner-newt-gears-special.html +++ b/jnlp-files/jogl-applet-runner-newt-gears-special.html @@ -12,8 +12,8 @@ JOGL NEWT JNLP Applet Runner Special Keys: + jar/jogl-all.jar, + jar/jogl-test.jar"> @@ -42,8 +42,8 @@ JOGL NEWT JNLP Applet Runner Special Keys: pluginspage="http://java.sun.com/javase/downloads/ea.jsp" archive="jar/applet-launcher.jar, jar/gluegen-rt.jar, - jar/jogl.all.jar, - jar/jogl.test.jar" + jar/jogl-all.jar, + jar/jogl-test.jar" codebase_lookup" value="false" subapplet.classname="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run" subapplet.displayname="JOGL GearsES2 Applet Transparent" diff --git a/jnlp-files/jogl-applet-runner-newt.jnlp b/jnlp-files/jogl-applet-runner-newt.jnlp index 259e39f18..c33e1b761 100644 --- a/jnlp-files/jogl-applet-runner-newt.jnlp +++ b/jnlp-files/jogl-applet-runner-newt.jnlp @@ -12,7 +12,7 @@ - + diff --git a/jnlp-files/jogl-applet-version-lancheronly.html b/jnlp-files/jogl-applet-version-lancheronly.html index 685d9115c..6880152fc 100644 --- a/jnlp-files/jogl-applet-version-lancheronly.html +++ b/jnlp-files/jogl-applet-version-lancheronly.html @@ -20,7 +20,7 @@ and your platform. + jar/jogl-all.jar"> @@ -36,7 +36,7 @@ and your platform. pluginspage="http://java.sun.com/javase/downloads/ea.jsp" archive="jar/applet-launcher.jar, jar/gluegen-rt.jar, - jar/jogl.all.jar" + jar/jogl-all.jar" codebase_lookup" value="false" subapplet.classname="jogamp.opengl.awt.VersionApplet" subapplet.displayname="JOGL Applet Version" diff --git a/jnlp-files/jogl-applet-version-napplet.html b/jnlp-files/jogl-applet-version-napplet.html index e8104cb60..aeccb710a 100644 --- a/jnlp-files/jogl-applet-version-napplet.html +++ b/jnlp-files/jogl-applet-version-napplet.html @@ -16,7 +16,7 @@ and your platform. width="800" height="600"> + jar/jogl-all.jar"> Sorry, no Java support detected. @@ -41,7 +41,7 @@ The applet above is instantiated with the following code: width="800" height="600"> <param name="code" value="jogamp.opengl.awt.VersionApplet"> <param name="archive" value="jar/gluegen-rt.jar, - jar/jogl.all.jar"> + jar/jogl-all.jar"> <param name="java_arguments" value="-Dsun.java2d.noddraw=true"> <comment> <embed code="jogamp.opengl.awt.VersionApplet" @@ -49,7 +49,7 @@ The applet above is instantiated with the following code: 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-all.jar" java_arguments="-Dsun.java2d.noddraw=true"> <noembed>Sorry, no Java support detected.</noembed> </embed> diff --git a/jnlp-files/jogl-applet-version.html b/jnlp-files/jogl-applet-version.html index 5b738964e..948e63095 100644 --- a/jnlp-files/jogl-applet-version.html +++ b/jnlp-files/jogl-applet-version.html @@ -22,7 +22,7 @@ otherwise it shall fallback to + jar/jogl-all.jar"> @@ -39,7 +39,7 @@ otherwise it shall fallback to pluginspage="http://java.sun.com/javase/downloads/ea.jsp" archive="jar/applet-launcher.jar, jar/gluegen-rt.jar, - jar/jogl.all.jar" + jar/jogl-all.jar" codebase_lookup" value="false" subapplet.classname="jogamp.opengl.awt.VersionApplet" subapplet.displayname="JOGL Applet Version" -- cgit v1.2.3 From 71b204eb577bc6e5e9fb6cf29c5f76e52a6c9726 Mon Sep 17 00:00:00 2001 From: Xerxes RÃ¥nby Date: Wed, 22 Aug 2012 11:35:35 +0200 Subject: JNLP: Cache jogl-all-natives and jogl-cg-natives for linux-armv6 and linux-armv6hf. Gluegen commit gluegen/commit/422d7a5eb53fca6642ebf4e8910d8b0311bb2597 Change/Lower ARM Requierements for GNU/Linux changed the *native-linux-arm* jar names; update jnlp-files accordingly. Due to the lack of OS Arch and ABI detection in JNLP launchers force us download both armv6 armel and armv6hf armhf ABI jars on ARM. --- jnlp-files/jogl-all-awt-cg.jnlp | 12 ++++++++---- jnlp-files/jogl-all-awt.jnlp | 6 ++++-- jnlp-files/jogl-all-mobile.jnlp | 6 ++++-- jnlp-files/jogl-all-noawt.jnlp | 6 ++++-- 4 files changed, 20 insertions(+), 10 deletions(-) (limited to 'jnlp-files') diff --git a/jnlp-files/jogl-all-awt-cg.jnlp b/jnlp-files/jogl-all-awt-cg.jnlp index 24c22c290..ab4c1cd64 100644 --- a/jnlp-files/jogl-all-awt-cg.jnlp +++ b/jnlp-files/jogl-all-awt-cg.jnlp @@ -69,12 +69,16 @@ - - + + + + - - + + + + diff --git a/jnlp-files/jogl-all-awt.jnlp b/jnlp-files/jogl-all-awt.jnlp index 4e05f8dac..a666eb4dd 100644 --- a/jnlp-files/jogl-all-awt.jnlp +++ b/jnlp-files/jogl-all-awt.jnlp @@ -56,10 +56,12 @@ - + + - + + diff --git a/jnlp-files/jogl-all-mobile.jnlp b/jnlp-files/jogl-all-mobile.jnlp index 43b9b3b09..710f74ab4 100644 --- a/jnlp-files/jogl-all-mobile.jnlp +++ b/jnlp-files/jogl-all-mobile.jnlp @@ -56,10 +56,12 @@ - + + - + + diff --git a/jnlp-files/jogl-all-noawt.jnlp b/jnlp-files/jogl-all-noawt.jnlp index eed6749c1..802b9b929 100644 --- a/jnlp-files/jogl-all-noawt.jnlp +++ b/jnlp-files/jogl-all-noawt.jnlp @@ -56,10 +56,12 @@ - + + - + + -- cgit v1.2.3 From 1cd40d8284f2f8d0da9b40c4ea714a20aad97094 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 31 Oct 2012 21:14:57 +0100 Subject: jogl-test-applets: Add 'force gl3' GearsES2 Applet for GL3 core testing on OSX --- .../jogl-applet-runner-newt-gears-gl3-napplet.html | 107 +++++++++++++++++++++ jnlp-files/jogl-test-applets.html | 3 +- 2 files changed, 109 insertions(+), 1 deletion(-) create mode 100644 jnlp-files/jogl-applet-runner-newt-gears-gl3-napplet.html (limited to 'jnlp-files') diff --git a/jnlp-files/jogl-applet-runner-newt-gears-gl3-napplet.html b/jnlp-files/jogl-applet-runner-newt-gears-gl3-napplet.html new file mode 100644 index 000000000..13d891943 --- /dev/null +++ b/jnlp-files/jogl-applet-runner-newt-gears-gl3-napplet.html @@ -0,0 +1,107 @@ + + + +JOGL NEWT Applet Runner - GearsES2 - GL3 Core - Normal Applet + + + +

+JOGL NEWT Applet Runner Special Keys:
+

+

+ +

+ + + + + + + + + + + + Sorry, no Java support detected. + + + + +

+ +

+Applet is using a GL3 core context, failure is expected if n/a on your platform! +

+ +

+ +The applet above is instantiated with the following code: + +

+<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
+      width="200" height="200">
+   <param name="code" value="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run">
+   <param name="archive" value="jar/gluegen-rt.jar,
+                                jar/jogl-all.jar,
+                                jar/jogl-test.jar">
+   <param name="java_arguments" value="-Dsun.java2d.noddraw=true">
+   <param name="gl_event_listener_class" value="com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2">
+   <param name="gl_profile" value="GL3">
+   <param name="gl_swap_interval" value="1">
+   <param name="gl_debug" value="false">
+   <param name="gl_trace" value="false">
+   <comment>
+     <embed code="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run"
+          width="200" height="200"
+          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-test.jar"
+          java_arguments="-Dsun.java2d.noddraw=true"
+          gl_event_listener_class="com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2"
+          gl_profile="GL3"
+          gl_swap_interval="1"
+          gl_debug="false"
+          gl_trace="false">
+        <noembed>Sorry, no Java support detected.</noembed>
+     </embed>
+   </comment>
+</object>
+
+
+ +

+

+ +Note that the jogl-test.jar, which contains the test applet class, +does not need to be signed! JogAmp Community signs +jogl.jar and gluegen-rt.jar, which contain +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. + +

+ + + diff --git a/jnlp-files/jogl-test-applets.html b/jnlp-files/jogl-test-applets.html index 81902a8a8..132945e4e 100644 --- a/jnlp-files/jogl-test-applets.html +++ b/jnlp-files/jogl-test-applets.html @@ -71,7 +71,8 @@ See Legend below table
Dual
LApplet
NApplet - (closeable)
+ (closeable, + force gl3)
Classic OpenGL Gears for ES2 -- cgit v1.2.3 From 4b7833fab73166338a3a2f27920a7b28a3e5e30f Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 21 Jun 2013 10:14:15 +0200 Subject: Fix applet html pages (title) --- jnlp-files/jogl-applet-runner-newt-gears-gl3-napplet.html | 2 +- jnlp-files/jogl-applet-runner-newt-gears-normal-napplet.html | 2 +- jnlp-files/jogl-applet-runner-newt-gears-normal-napplet2.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'jnlp-files') diff --git a/jnlp-files/jogl-applet-runner-newt-gears-gl3-napplet.html b/jnlp-files/jogl-applet-runner-newt-gears-gl3-napplet.html index 13d891943..cb2375e4c 100644 --- a/jnlp-files/jogl-applet-runner-newt-gears-gl3-napplet.html +++ b/jnlp-files/jogl-applet-runner-newt-gears-gl3-napplet.html @@ -1,7 +1,7 @@ -JOGL NEWT Applet Runner - GearsES2 - GL3 Core - Normal Applet +JOGL NEWT Applet Runner - GearsES2 - GL3 Core - (NApplet) diff --git a/jnlp-files/jogl-applet-runner-newt-gears-normal-napplet.html b/jnlp-files/jogl-applet-runner-newt-gears-normal-napplet.html index 37473befe..9b448394d 100644 --- a/jnlp-files/jogl-applet-runner-newt-gears-normal-napplet.html +++ b/jnlp-files/jogl-applet-runner-newt-gears-normal-napplet.html @@ -1,7 +1,7 @@ -JOGL NEWT Applet Runner - GearsES2 - normal - Normal Applet +JOGL NEWT Applet Runner - GearsES2 - normal - (NApplet) diff --git a/jnlp-files/jogl-applet-runner-newt-gears-normal-napplet2.html b/jnlp-files/jogl-applet-runner-newt-gears-normal-napplet2.html index 63df4ed60..8970aea53 100644 --- a/jnlp-files/jogl-applet-runner-newt-gears-normal-napplet2.html +++ b/jnlp-files/jogl-applet-runner-newt-gears-normal-napplet2.html @@ -1,7 +1,7 @@ -JOGL NEWT Applet Runner - GearsES2 - normal - Normal Applet - Closeable +JOGL NEWT Applet Runner - GearsES2 - normal - (NApplet) - Closeable -- cgit v1.2.3 From 3e4dac6373185a1a9061b394601221052b2bef84 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 19 Jul 2013 05:17:59 +0200 Subject: Movie JNLP/NAppletAdd: Add joal jar file --- jnlp-files/jogl-applet-runner-newt-MovieCube-napplet.html | 2 ++ jnlp-files/jogl-applet-runner-newt-MovieCube.html | 2 ++ 2 files changed, 4 insertions(+) (limited to 'jnlp-files') diff --git a/jnlp-files/jogl-applet-runner-newt-MovieCube-napplet.html b/jnlp-files/jogl-applet-runner-newt-MovieCube-napplet.html index f569c7c96..1b1ea3ba4 100644 --- a/jnlp-files/jogl-applet-runner-newt-MovieCube-napplet.html +++ b/jnlp-files/jogl-applet-runner-newt-MovieCube-napplet.html @@ -15,6 +15,7 @@ JogAmp's MovieCube - GLMediaPlayer Demo 01 @@ -29,6 +30,7 @@ JogAmp's MovieCube - GLMediaPlayer Demo 01 pluginspage="http://java.sun.com/javase/downloads/ea.jsp" archive="jar/gluegen-rt.jar, jar/jogl-all.jar, + jar/joal.jar, jar/jogl-test.jar" codebase_lookup" value="false" java_arguments="-Dsun.java2d.noddraw=true" diff --git a/jnlp-files/jogl-applet-runner-newt-MovieCube.html b/jnlp-files/jogl-applet-runner-newt-MovieCube.html index 7cb00244e..6a7c638d4 100644 --- a/jnlp-files/jogl-applet-runner-newt-MovieCube.html +++ b/jnlp-files/jogl-applet-runner-newt-MovieCube.html @@ -16,6 +16,7 @@ JogAmp's MovieCube - GLMediaPlayer Demo 01 @@ -39,6 +40,7 @@ JogAmp's MovieCube - GLMediaPlayer Demo 01 archive="jar/applet-launcher.jar, jar/gluegen-rt.jar, jar/jogl-all.jar, + jar/joal.jar, jar/jogl-test.jar" codebase_lookup" value="false" subapplet.classname="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run" -- cgit v1.2.3 From 64d7c6b7f28649f01f7e7e34eb8cd5716c440238 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 20 Jul 2013 01:33:58 -0700 Subject: Movie JNLP/NAppletAdd: joal jar file shall come before jogl's (dependency - refine commit 3e4dac6373185a1a9061b394601221052b2bef84) --- jnlp-files/jogl-applet-runner-newt-MovieCube-napplet.html | 4 ++-- jnlp-files/jogl-applet-runner-newt-MovieCube.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'jnlp-files') diff --git a/jnlp-files/jogl-applet-runner-newt-MovieCube-napplet.html b/jnlp-files/jogl-applet-runner-newt-MovieCube-napplet.html index 1b1ea3ba4..64806e50d 100644 --- a/jnlp-files/jogl-applet-runner-newt-MovieCube-napplet.html +++ b/jnlp-files/jogl-applet-runner-newt-MovieCube-napplet.html @@ -14,8 +14,8 @@ JogAmp's MovieCube - GLMediaPlayer Demo 01 width="510" height="300"> @@ -29,8 +29,8 @@ JogAmp's MovieCube - GLMediaPlayer Demo 01 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/joal.jar, + jar/jogl-all.jar, jar/jogl-test.jar" codebase_lookup" value="false" java_arguments="-Dsun.java2d.noddraw=true" diff --git a/jnlp-files/jogl-applet-runner-newt-MovieCube.html b/jnlp-files/jogl-applet-runner-newt-MovieCube.html index 6a7c638d4..caaeba395 100644 --- a/jnlp-files/jogl-applet-runner-newt-MovieCube.html +++ b/jnlp-files/jogl-applet-runner-newt-MovieCube.html @@ -15,8 +15,8 @@ JogAmp's MovieCube - GLMediaPlayer Demo 01 @@ -39,8 +39,8 @@ JogAmp's MovieCube - GLMediaPlayer Demo 01 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-all.jar, jar/jogl-test.jar" codebase_lookup" value="false" subapplet.classname="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run" -- cgit v1.2.3 From 6fbf6de172f50dce7f65790460458238bf780902 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 25 Sep 2013 05:57:43 +0200 Subject: Fix MovieCube/Simple Demo in 'Applet' mode: Use default ctor to completly initialize GLMediaPlayer demo w/ def. stream etc; Fix list of command keys in applet html page. --- .../jogl-applet-runner-newt-MovieCube-napplet.html | 22 +++++--- jnlp-files/jogl-applet-runner-newt-MovieCube.html | 22 +++++--- .../opengl/test/android/MovieSimpleActivity0.java | 2 +- .../opengl/test/android/MovieSimpleActivity1.java | 4 +- .../test/junit/jogl/demos/es2/av/MovieCube.java | 42 ++++++++++++++- .../test/junit/jogl/demos/es2/av/MovieSimple.java | 61 +++++++++++++++++----- 6 files changed, 121 insertions(+), 32 deletions(-) (limited to 'jnlp-files') diff --git a/jnlp-files/jogl-applet-runner-newt-MovieCube-napplet.html b/jnlp-files/jogl-applet-runner-newt-MovieCube-napplet.html index 64806e50d..5dc77f024 100644 --- a/jnlp-files/jogl-applet-runner-newt-MovieCube-napplet.html +++ b/jnlp-files/jogl-applet-runner-newt-MovieCube-napplet.html @@ -49,14 +49,20 @@ JogAmp's MovieCube - GLMediaPlayer Demo 01

MovieCube Keys:

    -
  • Cursor-Left - bwd 1s
  • -
  • Cursor-Up - fwd 10s
  • -
  • Cursor-Right - fwd 1s
  • -
  • Cursor-Down - bwd 10s
  • -
  • Escape - Restart w/ normal speed
  • -
  • Space - Toggle Pause
  • -
  • S - Half Speed
  • -
  • F - Double Speed
  • +
  • BWD / FWD: +
      +
    • 01s - Cursor left/right
    • +
    • 10s - Cursor down/up
    • +
    • 30s - Page down/up
    • +
  • +
  • Speed: +
      +
    • Pause - Space bar
    • +
    • Half - Keypad minus
    • +
    • Double - Keypad plus
    • +
    • Reset - Keypad multiply
    • +
  • +
  • Mute - M

diff --git a/jnlp-files/jogl-applet-runner-newt-MovieCube.html b/jnlp-files/jogl-applet-runner-newt-MovieCube.html index caaeba395..a154eb825 100644 --- a/jnlp-files/jogl-applet-runner-newt-MovieCube.html +++ b/jnlp-files/jogl-applet-runner-newt-MovieCube.html @@ -66,14 +66,20 @@ JogAmp's MovieCube - GLMediaPlayer Demo 01

MovieCube Keys:

    -
  • Cursor-Left - bwd 1s
  • -
  • Cursor-Up - fwd 10s
  • -
  • Cursor-Right - fwd 1s
  • -
  • Cursor-Down - bwd 10s
  • -
  • Escape - Restart w/ normal speed
  • -
  • Space - Toggle Pause
  • -
  • S - Half Speed
  • -
  • F - Double Speed
  • +
  • BWD / FWD: +
      +
    • 01s - Cursor left/right
    • +
    • 10s - Cursor down/up
    • +
    • 30s - Page down/up
    • +
  • +
  • Speed: +
      +
    • Pause - Space bar
    • +
    • Half - Keypad minus
    • +
    • Double - Keypad plus
    • +
    • Reset - Keypad multiply
    • +
  • +
  • Mute - M

diff --git a/src/test/com/jogamp/opengl/test/android/MovieSimpleActivity0.java b/src/test/com/jogamp/opengl/test/android/MovieSimpleActivity0.java index db73673a7..b5a9ce580 100644 --- a/src/test/com/jogamp/opengl/test/android/MovieSimpleActivity0.java +++ b/src/test/com/jogamp/opengl/test/android/MovieSimpleActivity0.java @@ -95,7 +95,7 @@ public class MovieSimpleActivity0 extends NewtBaseActivity { anim.add(glWindowMain); glWindowMain.setVisible(true); - final MovieSimple demoMain = new MovieSimple(); + final MovieSimple demoMain = new MovieSimple(null); demoMain.setScaleOrig(true); final GLMediaPlayer mPlayer = demoMain.getGLMediaPlayer(); mPlayer.addEventListener( new GLMediaPlayer.GLMediaEventListener() { diff --git a/src/test/com/jogamp/opengl/test/android/MovieSimpleActivity1.java b/src/test/com/jogamp/opengl/test/android/MovieSimpleActivity1.java index f94390dcd..e54300de5 100644 --- a/src/test/com/jogamp/opengl/test/android/MovieSimpleActivity1.java +++ b/src/test/com/jogamp/opengl/test/android/MovieSimpleActivity1.java @@ -128,7 +128,7 @@ public class MovieSimpleActivity1 extends NewtBaseActivity { anim.add(glWindowMain); glWindowMain.setVisible(true); - final MovieSimple demoMain = new MovieSimple(); + final MovieSimple demoMain = new MovieSimple(null); final GLMediaPlayer mPlayerMain = demoMain.getGLMediaPlayer(); if(mPlayerHUD) { demoMain.setEffects(MovieSimple.EFFECT_GRADIENT_BOTTOM2TOP); @@ -183,7 +183,7 @@ public class MovieSimpleActivity1 extends NewtBaseActivity { demoHUD = new MovieSimple(mPlayerShared); mPlayerSub = mPlayerShared; } else { - demoHUD = new MovieSimple(); + demoHUD = new MovieSimple(null); mPlayerSub = demoHUD.getGLMediaPlayer(); } mPlayerSub.addEventListener( new GLMediaPlayer.GLMediaEventListener() { diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieCube.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieCube.java index d10bba8c7..fe11f6aca 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieCube.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieCube.java @@ -81,10 +81,50 @@ public class MovieCube implements GLEventListener { defURI = _defURI; } + /** + * Default constructor which also issues {@link #initStream(URI, int, int, int)} w/ default values + * and polls until the {@link GLMediaPlayer} is {@link GLMediaPlayer.State#Initialized}. + * If {@link GLMediaEventListener#EVENT_CHANGE_EOS} is reached, the stream is started over again. + *

+ * This default constructor is merely useful for some drop-in test, e.g. using an applet. + *

+ */ public MovieCube() throws IOException, URISyntaxException { - this(-2.3f, 0f, 0f); + this(-2.3f, 0f, 0f); + + mPlayer.addEventListener(new GLMediaEventListener() { + @Override + public void newFrameAvailable(GLMediaPlayer ts, TextureFrame newFrame, long when) { } + + @Override + public void attributesChanged(final GLMediaPlayer mp, int event_mask, long when) { + System.err.println("MovieCube AttributesChanges: events_mask 0x"+Integer.toHexString(event_mask)+", when "+when); + System.err.println("MovieCube State: "+mp); + if( 0 != ( GLMediaEventListener.EVENT_CHANGE_SIZE & event_mask ) ) { + resetGLState(); + } + if( 0 != ( GLMediaEventListener.EVENT_CHANGE_EOS & event_mask ) ) { + // loop for-ever .. + mPlayer.seek(0); + mPlayer.play(); + } + } + }); + initStream(defURI, GLMediaPlayer.STREAM_ID_AUTO, GLMediaPlayer.STREAM_ID_AUTO, 3 /* textureCount */); + StreamException se = null; + while( null == se && GLMediaPlayer.State.Initialized != mPlayer.getState() ) { + try { + Thread.sleep(16); + } catch (InterruptedException e) { } + se = mPlayer.getStreamException(); + } + if( null != se ) { + se.printStackTrace(); + throw new RuntimeException(se); + } } + /** Custom constructor, user needs to issue {@link #initStream(URI, int, int, int)} afterwards. */ public MovieCube(float zoom0, float rotx, float roty) throws IOException { this.zoom0 = zoom0; this.rotx = rotx; diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieSimple.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieSimple.java index 907813191..d29381f35 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieSimple.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieSimple.java @@ -95,7 +95,6 @@ public class MovieSimple implements GLEventListener { private int swapInterval = 1; private GLMediaPlayer mPlayer; - private boolean mPlayerExternal; private boolean mPlayerShared; private boolean mPlayerScaleOrig; private float[] verts = null; @@ -232,20 +231,58 @@ public class MovieSimple implements GLEventListener { } }; + /** + * Default constructor which also issues {@link #initStream(URI, int, int, int)} w/ default values + * and polls until the {@link GLMediaPlayer} is {@link GLMediaPlayer.State#Initialized}. + * If {@link GLMediaEventListener#EVENT_CHANGE_EOS} is reached, the stream is started over again. + *

+ * This default constructor is merely useful for some drop-in test, e.g. using an applet. + *

+ */ public MovieSimple() { - mPlayerScaleOrig = false; - mPlayerShared = false; - mPlayerExternal = false; - mPlayer = GLMediaPlayerFactory.createDefault(); - System.out.println("pC.1a "+mPlayer); + this(null); + + mPlayer.addEventListener(new GLMediaEventListener() { + @Override + public void newFrameAvailable(GLMediaPlayer ts, TextureFrame newFrame, long when) { } + + @Override + public void attributesChanged(final GLMediaPlayer mp, int event_mask, long when) { + System.err.println("MovieCube AttributesChanges: events_mask 0x"+Integer.toHexString(event_mask)+", when "+when); + System.err.println("MovieCube State: "+mp); + if( 0 != ( GLMediaEventListener.EVENT_CHANGE_SIZE & event_mask ) ) { + resetGLState(); + } + if( 0 != ( GLMediaEventListener.EVENT_CHANGE_EOS & event_mask ) ) { + // loop for-ever .. + mPlayer.seek(0); + mPlayer.play(); + } + } + }); + initStream(defURI, GLMediaPlayer.STREAM_ID_AUTO, GLMediaPlayer.STREAM_ID_AUTO, 3 /* textureCount */); + StreamException se = null; + while( null == se && GLMediaPlayer.State.Initialized != mPlayer.getState() ) { + try { + Thread.sleep(16); + } catch (InterruptedException e) { } + se = mPlayer.getStreamException(); + } + if( null != se ) { + se.printStackTrace(); + throw new RuntimeException(se); + } } + /** Custom constructor, user needs to issue {@link #initStream(URI, int, int, int)} afterwards. */ public MovieSimple(GLMediaPlayer sharedMediaPlayer) throws IllegalStateException { - mPlayerScaleOrig = false; - mPlayerShared = true; - mPlayerExternal = true; mPlayer = sharedMediaPlayer; - System.out.println("pC.2 shared "+mPlayerShared+", "+mPlayer); + mPlayerScaleOrig = false; + mPlayerShared = null != mPlayer; + if( !mPlayerShared ) { + mPlayer = GLMediaPlayerFactory.createDefault(); + } + System.out.println("pC.1a shared "+mPlayerShared+", "+mPlayer); } public void initStream(URI streamLoc, int vid, int aid, int textureCount) { @@ -560,7 +597,7 @@ public class MovieSimple implements GLEventListener { System.out.println("pD.1 "+mPlayer+", disposePlayer "+disposePlayer); GL2ES2 gl = drawable.getGL().getGL2ES2(); if( disposePlayer ) { - if(!mPlayerExternal) { + if(!mPlayerShared) { mPlayer.destroy(gl); } System.out.println("pD.X "+mPlayer); @@ -717,7 +754,7 @@ public class MovieSimple implements GLEventListener { System.err.println("forceGLDef "+forceGLDef); System.err.println("swapInterval "+swapInterval); - final MovieSimple ms = new MovieSimple(); + final MovieSimple ms = new MovieSimple(null); ms.setSwapInterval(swapInterval); ms.setScaleOrig(!zoom); ms.setOrthoProjection(ortho); -- cgit v1.2.3 From 9a8f9b9f7e6148b60b6f0f4326df8d213774284c Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 27 Sep 2013 13:23:39 +0200 Subject: Bug 816: Fix JAWTWindow's getLocationOnScreenNonBlocking(); Derive CALayer position from AWT component's location on screen. Track fixedFrame size of root CALayer; Add Split layout to unit test, add [manual] Applet tests. - Fix JAWTWindow's getLocationOnScreenNonBlocking() Skip JRootPane while traversing up to root Container. JRootPane would duplicate the top-level container's offset (Window insets). - Derive CALayer position from AWT component's location on screen. Add Split layout to unit test, add [manual] Applet tests. AWT >= 7u40: - AWT position is top-left w/ insets, where CALayer position is bottom/left from root CALayer w/o insets. - Use getLocationOnScreenNonBlocking() to get location-on-screen w/o insets. - Native code: flip origin AWT < 7u40 still uses fixed position 0/0 for root and sub layer. - Track fixedFrame size of root CALayer - MyCALayer: - Override layoutSublayers to validate root and sub-layer pos/size - Override setFrame to use fixedFrame, if set (similar to MyNSOpenGLLayer) - Add Split layout to unit test, add [manual] Applet tests. - Thx to 'jimthev' and 'Manu' for providing Applet unit tests --- jnlp-files/jogl-applet-bug816_glcanvas01.html | 32 +++ jnlp-files/jogl-applet-bug816_glcanvas02.html | 32 +++ jnlp-files/jogl-test-applets.html | 11 + make/scripts/tests.sh | 4 +- .../com/jogamp/nativewindow/awt/JAWTWindow.java | 46 ++-- .../classes/jogamp/nativewindow/awt/AWTMisc.java | 15 +- .../nativewindow/jawt/macosx/MacOSXJAWTWindow.java | 46 +++- .../jogamp/nativewindow/macosx/OSXUtil.java | 12 +- src/nativewindow/native/macosx/OSXmisc.m | 237 +++++++++++++-------- .../junit/jogl/awt/TestBug816OSXCALayerPosAWT.java | 98 +++++++-- .../jogl/demos/es2/awt/Bug816AppletGLCanvas01.java | 134 ++++++++++++ .../jogl/demos/es2/awt/Bug816AppletGLCanvas02.java | 85 ++++++++ 12 files changed, 611 insertions(+), 141 deletions(-) create mode 100644 jnlp-files/jogl-applet-bug816_glcanvas01.html create mode 100644 jnlp-files/jogl-applet-bug816_glcanvas02.html create mode 100644 src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/Bug816AppletGLCanvas01.java create mode 100644 src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/Bug816AppletGLCanvas02.java (limited to 'jnlp-files') diff --git a/jnlp-files/jogl-applet-bug816_glcanvas01.html b/jnlp-files/jogl-applet-bug816_glcanvas01.html new file mode 100644 index 000000000..c460ff12c --- /dev/null +++ b/jnlp-files/jogl-applet-bug816_glcanvas01.html @@ -0,0 +1,32 @@ + + + +Bug816 OSX CALayer Pos - Custom Bounds + + + +

+Bug816 OSX CALayer Pos - Custom Bounds +

+ +

+ + + + + + Sorry, no Java support detected. + + + +

+ + diff --git a/jnlp-files/jogl-applet-bug816_glcanvas02.html b/jnlp-files/jogl-applet-bug816_glcanvas02.html new file mode 100644 index 000000000..850b9752a --- /dev/null +++ b/jnlp-files/jogl-applet-bug816_glcanvas02.html @@ -0,0 +1,32 @@ + + + +Bug816 OSX CALayer Pos - Box Layout + + + +

+Bug816 OSX CALayer Pos - Box Layout +

+ +

+ + + + + + Sorry, no Java support detected. + + + +

+ + diff --git a/jnlp-files/jogl-test-applets.html b/jnlp-files/jogl-test-applets.html index 132945e4e..69fb70eca 100644 --- a/jnlp-files/jogl-test-applets.html +++ b/jnlp-files/jogl-test-applets.html @@ -198,6 +198,17 @@ Click on the Launch link to actually launch the demo.
+

+Misc tests: +

+

+ diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh index 442b12672..8c58efb3f 100644 --- a/make/scripts/tests.sh +++ b/make/scripts/tests.sh @@ -332,7 +332,7 @@ function testawtswt() { #testnoawt com.jogamp.opengl.test.junit.jogl.tile.TestRandomTiledRendering2GL2NEWT $* #testawt com.jogamp.opengl.test.junit.jogl.tile.TestRandomTiledRendering3GL2AWT $* #testawt com.jogamp.opengl.test.junit.jogl.tile.TestTiledPrintingGearsAWT $* -testawt com.jogamp.opengl.test.junit.jogl.tile.TestTiledPrintingGearsSwingAWT $* +#testawt com.jogamp.opengl.test.junit.jogl.tile.TestTiledPrintingGearsSwingAWT $* #testawt com.jogamp.opengl.test.junit.jogl.tile.TestTiledPrintingGearsSwingAWT2 $* #testawt com.jogamp.opengl.test.junit.jogl.tile.TestTiledPrintingGearsNewtAWT $* #testawt com.jogamp.opengl.test.junit.jogl.tile.TestTiledPrintingNIOImageSwingAWT $* @@ -454,7 +454,7 @@ testawt com.jogamp.opengl.test.junit.jogl.tile.TestTiledPrintingGearsSwingAWT $* #testawt com.jogamp.opengl.test.junit.jogl.acore.TestPBufferDeadlockAWT $* #testawt com.jogamp.opengl.test.junit.jogl.acore.TestShutdownCompleteAWT $* #testawt com.jogamp.opengl.test.junit.jogl.acore.x11.TestGLXCallsOnAWT $* -#testawt com.jogamp.opengl.test.junit.jogl.awt.TestBug816OSXCALayerPosAWT $* +testawt com.jogamp.opengl.test.junit.jogl.awt.TestBug816OSXCALayerPosAWT $* #testawt com.jogamp.opengl.test.junit.jogl.awt.TestBug675BeansInDesignTimeAWT $* #testawt com.jogamp.opengl.test.junit.jogl.awt.TestBug551AWT $* #testawt com.jogamp.opengl.test.junit.jogl.awt.TestBug572AWT $* diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java b/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java index a71356b1c..576fcf4ed 100644 --- a/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java +++ b/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java @@ -46,6 +46,7 @@ import java.awt.Container; import java.awt.event.ComponentEvent; import java.awt.event.ComponentListener; import java.applet.Applet; + import javax.media.nativewindow.AbstractGraphicsConfiguration; import javax.media.nativewindow.AbstractGraphicsDevice; import javax.media.nativewindow.CapabilitiesImmutable; @@ -60,6 +61,7 @@ import javax.media.nativewindow.util.InsetsImmutable; import javax.media.nativewindow.util.Point; import javax.media.nativewindow.util.Rectangle; import javax.media.nativewindow.util.RectangleImmutable; +import javax.swing.JRootPane; import jogamp.nativewindow.SurfaceUpdatedHelper; import jogamp.nativewindow.jawt.JAWT; @@ -227,9 +229,6 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface, if( !isOffscreenLayerSurfaceEnabled() ) { throw new NativeWindowException("Not an offscreen layer surface"); } - if(DEBUG) { - System.err.println("JAWTWindow.attachSurfaceHandle: "+toHexString(layerHandle) + ", bounds "+bounds); - } attachSurfaceLayerImpl(layerHandle); offscreenSurfaceLayer = layerHandle; component.repaint(); @@ -248,14 +247,14 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface, * Call this method if any parent or ancestor's layout has been changed, * which could affects the layout of this surface. *

- * @see #isOffscreenLayerSurfaceEnabled() + * @see #isOffscreenLayerSurfaceEnabled() * @throws NativeWindowException if {@link #isOffscreenLayerSurfaceEnabled()} == false */ - protected void layoutSurfaceLayerImpl(long layerHandle, int width, int height) {} + protected void layoutSurfaceLayerImpl(long layerHandle) {} private final void layoutSurfaceLayerIfEnabled() throws NativeWindowException { if( isOffscreenLayerSurfaceEnabled() && 0 != offscreenSurfaceLayer ) { - layoutSurfaceLayerImpl(offscreenSurfaceLayer, getWidth(), getHeight()); + layoutSurfaceLayerImpl(offscreenSurfaceLayer); } } @@ -533,7 +532,11 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface, System.err.println("Warning: JAWT Lock hold, but not the AWT tree lock: "+this); Thread.dumpStack(); } - return getLocationOnScreenNonBlocking(storage, component); + if( null == storage ) { + storage = new Point(); + } + getLocationOnScreenNonBlocking(storage, component); + return storage; } java.awt.Point awtLOS = component.getLocationOnScreen(); if(null!=storage) { @@ -569,21 +572,28 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface, } protected abstract Point getLocationOnScreenNativeImpl(int x, int y); - protected static Point getLocationOnScreenNonBlocking(Point storage, Component comp) { - int x = 0; - int y = 0; + protected static Component getLocationOnScreenNonBlocking(Point storage, Component comp) { + Component last = null; while(null != comp) { - x += comp.getX(); - y += comp.getY(); + final int dx = comp.getX(); + final int dy = comp.getY(); + if( ! ( comp instanceof JRootPane ) ) { + if( DEBUG ) { + System.err.print("LOS: "+storage+" + "+comp.getClass().getSimpleName()+"["+dx+"/"+dy+"] -> "); + } + storage.translate(dx, dy); + if( DEBUG ) { + System.err.println(storage); + } + last = comp; + } else if( DEBUG ) { + System.err.println("LOS: ignore "+comp.getClass().getSimpleName()+"["+dx+"/"+dy+"]"); + } comp = comp.getParent(); } - if(null!=storage) { - storage.translate(x, y); - return storage; - } - return new Point(x, y); + return last; } - + @Override public boolean hasFocus() { return component.hasFocus(); diff --git a/src/nativewindow/classes/jogamp/nativewindow/awt/AWTMisc.java b/src/nativewindow/classes/jogamp/nativewindow/awt/AWTMisc.java index f38e7ea2b..e326b65bd 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/awt/AWTMisc.java +++ b/src/nativewindow/classes/jogamp/nativewindow/awt/AWTMisc.java @@ -28,13 +28,16 @@ package jogamp.nativewindow.awt; import java.awt.FocusTraversalPolicy; +import java.awt.Insets; import java.awt.Window; import java.awt.Component; import java.awt.Container; import java.awt.Frame; + +import javax.swing.JComponent; import javax.swing.JFrame; +import javax.swing.JRootPane; import javax.swing.WindowConstants; - import javax.media.nativewindow.NativeWindowException; import javax.media.nativewindow.WindowClosingProtocol; import javax.swing.MenuSelectionManager; @@ -68,6 +71,16 @@ public class AWTMisc { } return (Container) c; } + + public static Insets getInsets(Component c) { + if( c instanceof Window ) { + return ((Window)c).getInsets(); + } + if( c instanceof JComponent ) { + return ((JComponent)c).getInsets(); + } + return null; + } public static interface ComponentAction { /** diff --git a/src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java b/src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java index 666f895f4..6d08078b6 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java +++ b/src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java @@ -40,6 +40,7 @@ package jogamp.nativewindow.jawt.macosx; +import java.awt.Component; import java.nio.Buffer; import java.security.AccessController; import java.security.PrivilegedAction; @@ -49,11 +50,11 @@ import javax.media.nativewindow.Capabilities; import javax.media.nativewindow.NativeWindow; import javax.media.nativewindow.NativeWindowException; import javax.media.nativewindow.MutableSurface; -import javax.media.nativewindow.NativeWindowFactory; import javax.media.nativewindow.util.Point; import com.jogamp.nativewindow.awt.JAWTWindow; +import jogamp.nativewindow.awt.AWTMisc; import jogamp.nativewindow.jawt.JAWT; import jogamp.nativewindow.jawt.JAWTFactory; import jogamp.nativewindow.jawt.JAWTUtil; @@ -105,19 +106,42 @@ public class MacOSXJAWTWindow extends JAWTWindow implements MutableSurface { @Override protected void attachSurfaceLayerImpl(final long layerHandle) { OSXUtil.RunOnMainThread(false, new Runnable() { - public void run() { - OSXUtil.AddCASublayer(rootSurfaceLayer, layerHandle, getWidth(), getHeight(), JAWTUtil.getOSXCALayerQuirks()); + public void run() { + // AWT position is top-left w/ insets, where CALayer position is bottom/left from root CALayer w/o insets. + // Determine p0: components location on screen w/o insets. + // CALayer position will be determined in native code. + final Point p0 = new Point(); + final Component outterComp = getLocationOnScreenNonBlocking(p0, component); + final java.awt.Insets ins = AWTMisc.getInsets(outterComp); + if(null != ins) { + p0.translate(-ins.left, -ins.top); + } + if( DEBUG ) { + final java.awt.Point wP0 = outterComp.getLocationOnScreen(); + System.err.println("JAWTWindow.attachSurfaceHandleImpl: "+toHexString(layerHandle) + ", wP0 "+wP0+"[ins "+ins+"], p0 "+p0+", bounds "+bounds); + } + OSXUtil.AddCASublayer(rootSurfaceLayer, layerHandle, p0.getX(), p0.getY(), getWidth(), getHeight(), JAWTUtil.getOSXCALayerQuirks()); } } ); } @Override - protected void layoutSurfaceLayerImpl(long layerHandle, int width, int height) { + protected void layoutSurfaceLayerImpl(long layerHandle) { final int caLayerQuirks = JAWTUtil.getOSXCALayerQuirks(); if( 0 != caLayerQuirks ) { - if(DEBUG) { - System.err.println("JAWTWindow.layoutSurfaceLayerImpl: "+toHexString(layerHandle) + ", "+width+"x"+height+", caLayerQuirks "+caLayerQuirks+"; "+this); + // AWT position is top-left w/ insets, where CALayer position is bottom/left from root CALayer w/o insets. + // Determine p0: components location on screen w/o insets. + // CALayer position will be determined in native code. + final Point p0 = new Point(); + final Component outterComp = getLocationOnScreenNonBlocking(p0, component); + final java.awt.Insets ins = AWTMisc.getInsets(outterComp); + if( null != ins ) { + p0.translate(-ins.left, -ins.top); } - OSXUtil.FixCALayerLayout(rootSurfaceLayer, layerHandle, width, height, caLayerQuirks); + if( DEBUG ) { + final java.awt.Point wP0 = outterComp.getLocationOnScreen(); + System.err.println("JAWTWindow.layoutSurfaceLayerImpl: "+toHexString(layerHandle) + ", wP0 "+wP0+"[ins "+ins+"], p0 "+p0+", bounds "+bounds); + } + OSXUtil.FixCALayerLayout(rootSurfaceLayer, layerHandle, p0.getX(), p0.getY(), getWidth(), getHeight(), caLayerQuirks); } } @@ -312,8 +336,12 @@ public class MacOSXJAWTWindow extends JAWTWindow implements MutableSurface { *

*/ @Override - public Point getLocationOnScreen(Point storage) { - return getLocationOnScreenNonBlocking(storage, component); + public Point getLocationOnScreen(Point storage) { + if( null == storage ) { + storage = new Point(); + } + getLocationOnScreenNonBlocking(storage, component); + return storage; } protected Point getLocationOnScreenNativeImpl(final int x0, final int y0) { return null; } diff --git a/src/nativewindow/classes/jogamp/nativewindow/macosx/OSXUtil.java b/src/nativewindow/classes/jogamp/nativewindow/macosx/OSXUtil.java index de24a76db..2112131ed 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/macosx/OSXUtil.java +++ b/src/nativewindow/classes/jogamp/nativewindow/macosx/OSXUtil.java @@ -163,14 +163,14 @@ public class OSXUtil implements ToolkitProperties { * @see #CreateCALayer(int, int) * @see #RemoveCASublayer(long, long, boolean) */ - public static void AddCASublayer(final long rootCALayer, final long subCALayer, final int width, final int height, final int caLayerQuirks) { + public static void AddCASublayer(final long rootCALayer, final long subCALayer, final int x, final int y, final int width, final int height, final int caLayerQuirks) { if(0==rootCALayer || 0==subCALayer) { throw new IllegalArgumentException("rootCALayer 0x"+Long.toHexString(rootCALayer)+", subCALayer 0x"+Long.toHexString(subCALayer)); } if(DEBUG) { System.err.println("OSXUtil.AttachCALayer: caLayerQuirks "+caLayerQuirks+", 0x"+Long.toHexString(subCALayer)+" - "+Thread.currentThread().getName()); } - AddCASublayer0(rootCALayer, subCALayer, width, height, caLayerQuirks); + AddCASublayer0(rootCALayer, subCALayer, x, y, width, height, caLayerQuirks); } /** @@ -190,11 +190,11 @@ public class OSXUtil implements ToolkitProperties { * @param height the expected height * @param caLayerQuirks TODO */ - public static void FixCALayerLayout(final long rootCALayer, final long subCALayer, final int width, final int height, final int caLayerQuirks) { + public static void FixCALayerLayout(final long rootCALayer, final long subCALayer, final int x, final int y, final int width, final int height, final int caLayerQuirks) { if( 0==rootCALayer && 0==subCALayer ) { return; } - FixCALayerLayout0(rootCALayer, subCALayer, width, height, caLayerQuirks); + FixCALayerLayout0(rootCALayer, subCALayer, x, y, width, height, caLayerQuirks); } /** @@ -357,8 +357,8 @@ public class OSXUtil implements ToolkitProperties { private static native long GetNSView0(long nsWindow); private static native long GetNSWindow0(long nsView); private static native long CreateCALayer0(int width, int height); - private static native void AddCASublayer0(long rootCALayer, long subCALayer, int width, int height, int caLayerQuirks); - private static native void FixCALayerLayout0(long rootCALayer, long subCALayer, int width, int height, int caLayerQuirks); + private static native void AddCASublayer0(long rootCALayer, long subCALayer, int x, int y, int width, int height, int caLayerQuirks); + private static native void FixCALayerLayout0(long rootCALayer, long subCALayer, int x, int y, int width, int height, int caLayerQuirks); private static native void RemoveCASublayer0(long rootCALayer, long subCALayer); private static native void DestroyCALayer0(long caLayer); private static native void RunOnMainThread0(Runnable runnable); diff --git a/src/nativewindow/native/macosx/OSXmisc.m b/src/nativewindow/native/macosx/OSXmisc.m index fbe37be7d..fa40c871f 100644 --- a/src/nativewindow/native/macosx/OSXmisc.m +++ b/src/nativewindow/native/macosx/OSXmisc.m @@ -333,6 +333,9 @@ JNIEXPORT jlong JNICALL Java_jogamp_nativewindow_macosx_OSXUtil_GetNSWindow0 */ @interface MyCALayer: CALayer { +@private + BOOL fixedFrameSet; + CGRect fixedFrame; } - (id)init; #ifdef DBG_LIFECYCLE @@ -341,6 +344,9 @@ JNIEXPORT jlong JNICALL Java_jogamp_nativewindow_macosx_OSXUtil_GetNSWindow0 - (void)dealloc; #endif - (id)actionForKey:(NSString *)key ; +- (void)layoutSublayers; +- (void)setFrame:(CGRect) frame; +- (void)fixCALayerLayout: (CALayer*) subLayer x:(jint)x y:(jint)y width:(jint)width height:(jint)height caLayerQuirks:(jint)caLayerQuirks force:(jboolean) force; @end @@ -350,6 +356,8 @@ JNIEXPORT jlong JNICALL Java_jogamp_nativewindow_macosx_OSXUtil_GetNSWindow0 { DBG_PRINT("MyCALayer::init.0\n"); MyCALayer * o = [super init]; + o->fixedFrameSet = 0; + o->fixedFrame = CGRectMake(0, 0, 0, 0); DBG_PRINT("MyCALayer::init.X: new %p\n", o); return o; } @@ -390,6 +398,127 @@ JNIEXPORT jlong JNICALL Java_jogamp_nativewindow_macosx_OSXUtil_GetNSWindow0 // return [super actionForKey: key]; } +- (void)layoutSublayers +{ + if( fixedFrameSet ) { + NSArray* subs = [self sublayers]; + if( NULL != subs ) { + CGRect rFrame = [self frame]; + if( !CGRectEqualToRect(fixedFrame, rFrame) ) { + #ifdef VERBOSE + DBG_PRINT("CALayer::layoutSublayers.0: Root %p frame %lf/%lf %lfx%lf -> %lf/%lf %lfx%lf\n", + self, + rFrame.origin.x, rFrame.origin.y, rFrame.size.width, rFrame.size.height, + fixedFrame.origin.x, fixedFrame.origin.y, fixedFrame.size.width, fixedFrame.size.height); + #endif + [super setFrame: fixedFrame]; + } + NSUInteger i = 0; + for(i=0; i<[subs count]; i++) { + CALayer* sub = [subs objectAtIndex: i]; + CGRect sFrame = [sub frame]; + CGRect sFrame2 = CGRectMake(0, 0, fixedFrame.size.width, fixedFrame.size.height); + if( !CGRectEqualToRect(sFrame2, sFrame) ) { + #ifdef VERBOSE + DBG_PRINT("CALayer::layoutSublayers.1: Sub[%d] %p frame %lf/%lf %lfx%lf -> %lf/%lf %lfx%lf\n", + (int)i, sub, + sFrame.origin.x, sFrame.origin.y, sFrame.size.width, sFrame.size.height, + sFrame2.origin.x, sFrame2.origin.y, sFrame2.size.width, sFrame2.size.height); + #endif + [sub setFrame: sFrame2]; + } + #ifdef VERBOSE + DBG_PRINT("CALayer::layoutSublayers.X: Root %p . Sub[%d] %p : frame r: %lf/%lf %lfx%lf . s: %lf/%lf %lfx%lf\n", + self, (int)i, sub, + rFrame.origin.x, rFrame.origin.y, rFrame.size.width, rFrame.size.height, + sFrame.origin.x, sFrame.origin.y, sFrame.size.width, sFrame.size.height); + #endif + } + } + } else { + [super layoutSublayers]; + } +} + +- (void) setFrame:(CGRect) frame +{ + if( fixedFrameSet ) { + [super setFrame: fixedFrame]; + } else { + [super setFrame: frame]; + } +} + +- (void)fixCALayerLayout: (CALayer*) subLayer x:(jint)x y:(jint)y width:(jint)width height:(jint)height caLayerQuirks:(jint)caLayerQuirks force:(jboolean) force +{ + { + CALayer* superLayer = [self superlayer]; + CGRect superFrame = [superLayer frame]; + CGRect lFrame = [self frame]; + int posQuirk = 0 != ( NW_DEDICATEDFRAME_QUIRK_POSITION & caLayerQuirks ) && ( lFrame.origin.x!=0 || lFrame.origin.y!=0 ); + int sizeQuirk = 0 != ( NW_DEDICATEDFRAME_QUIRK_SIZE & caLayerQuirks ) && ( lFrame.size.width!=width || lFrame.size.height!=height ); + if( !posQuirk ) { + // Use root layer position, sub-layer will be on 0/0, + // Given AWT position is location on screen w/o insets and top/left origin! + fixedFrame.origin.x = x; + fixedFrame.origin.y = superFrame.size.height - height - y; // AWT's position top/left -> bottom/left + posQuirk |= 8; + } else { + // Buggy super layer position, always use 0/0 + fixedFrame.origin.x = 0; + fixedFrame.origin.y = 0; + } + if( !sizeQuirk ) { + fixedFrame.size.width = lFrame.size.width; + fixedFrame.size.height = lFrame.size.height; + } else { + fixedFrame.size.width = width; + fixedFrame.size.height = height; + } + DBG_PRINT("CALayer::FixCALayerLayout0.0: Quirks [%d, pos %d, size %d], Super %p frame %lf/%lf %lfx%lf, Root %p frame %lf/%lf %lfx%lf, usr %d/%d %dx%d -> %lf/%lf %lfx%lf\n", + caLayerQuirks, posQuirk, sizeQuirk, + superLayer, superFrame.origin.x, superFrame.origin.y, superFrame.size.width, superFrame.size.height, + self, lFrame.origin.x, lFrame.origin.y, lFrame.size.width, lFrame.size.height, + x, y, width, height, fixedFrame.origin.x, fixedFrame.origin.y, fixedFrame.size.width, fixedFrame.size.height); + if( posQuirk || sizeQuirk ) { + fixedFrameSet = 1; + [super setFrame: fixedFrame]; + } + } + if( NULL != subLayer ) { + CGRect lFrame = [subLayer frame]; + int sizeQuirk = 0 != ( NW_DEDICATEDFRAME_QUIRK_SIZE & caLayerQuirks ) && ( lFrame.size.width!=width || lFrame.size.height!=height ); + CGFloat _x, _y, _w, _h; + int posQuirk = 0 != ( NW_DEDICATEDFRAME_QUIRK_POSITION & caLayerQuirks ) && ( lFrame.origin.x!=0 || lFrame.origin.y!=0 ); + // Sub rel. to used root layer + _x = 0; + _y = 0; + posQuirk |= 8; + if( !sizeQuirk ) { + _w = lFrame.size.width; + _h = lFrame.size.height; + } else { + _w = width; + _h = height; + } + DBG_PRINT("CALayer::FixCALayerLayout1.0: Quirks [%d, pos %d, size %d], SubL %p frame %lf/%lf %lfx%lf, usr %dx%d -> %lf/%lf %lfx%lf\n", + caLayerQuirks, posQuirk, sizeQuirk, subLayer, lFrame.origin.x, lFrame.origin.y, lFrame.size.width, lFrame.size.height, + width, height, _x, _y, _w, _h); + if( force || posQuirk || sizeQuirk ) { + lFrame.origin.x = _x; + lFrame.origin.y = _y; + lFrame.size.width = _w; + lFrame.size.height = _h; + if( [subLayer conformsToProtocol:@protocol(NWDedicatedFrame)] ) { + CALayer * subLayerDS = (CALayer *) subLayer; + [subLayerDS setDedicatedFrame: lFrame quirks: caLayerQuirks]; + } else { + [subLayer setFrame: lFrame]; + } + } + } +} + @end /* @@ -409,98 +538,32 @@ JNIEXPORT jlong JNICALL Java_jogamp_nativewindow_macosx_OSXUtil_CreateCALayer0 if(0 == height) { height = 32; } // initial dummy size ! - CGRect lRect = [layer frame]; - lRect.origin.x = 0; - lRect.origin.y = 0; - lRect.size.width = width; - lRect.size.height = height; - [layer setFrame: lRect]; + CGRect lFrame = [layer frame]; + lFrame.origin.x = 0; + lFrame.origin.y = 0; + lFrame.size.width = width; + lFrame.size.height = height; + [layer setFrame: lFrame]; // no animations for add/remove/swap sublayers etc // doesn't work: [layer removeAnimationForKey: kCAOnOrderIn, kCAOnOrderOut, kCATransition] [layer removeAllAnimations]; // [layer addAnimation:nil forKey:kCATransition]; [layer setAutoresizingMask: (kCALayerWidthSizable|kCALayerHeightSizable)]; [layer setNeedsDisplayOnBoundsChange: YES]; - DBG_PRINT("CALayer::CreateCALayer.1: root %p %lf/%lf %lfx%lf\n", layer, lRect.origin.x, lRect.origin.y, lRect.size.width, lRect.size.height); + DBG_PRINT("CALayer::CreateCALayer.1: root %p %lf/%lf %lfx%lf\n", layer, lFrame.origin.x, lFrame.origin.y, lFrame.size.width, lFrame.size.height); [pool release]; DBG_PRINT("CALayer::CreateCALayer.X: root %p (refcnt %d)\n", layer, (int)[layer retainCount]); return (jlong) ((intptr_t) layer); } -static void FixCALayerLayout0(MyCALayer* rootLayer, CALayer* subLayer, jint width, jint height, jint caLayerQuirks, jboolean force) { - if( NULL != rootLayer ) { - CGRect lRect = [rootLayer frame]; - int posQuirk = 0 != ( NW_DEDICATEDFRAME_QUIRK_POSITION & caLayerQuirks ) && ( lRect.origin.x!=0 || lRect.origin.y!=0 ); - int sizeQuirk = 0 != ( NW_DEDICATEDFRAME_QUIRK_SIZE & caLayerQuirks ) && ( lRect.size.width!=width || lRect.size.height!=height ); - CGFloat _x, _y, _w, _h; - // force root -> 0/0 - _x = 0; - _y = 0; - posQuirk |= 8; - if( sizeQuirk ) { - _w = width; - _h = height; - } else { - _w = lRect.size.width; - _h = lRect.size.height; - } - DBG_PRINT("CALayer::FixCALayerLayout0.0: Quirks [%d, pos %d, size %d], Root %p frame %lf/%lf %lfx%lf, usr %dx%d -> %lf/%lf %lfx%lf\n", - caLayerQuirks, posQuirk, sizeQuirk, rootLayer, lRect.origin.x, lRect.origin.y, lRect.size.width, lRect.size.height, - width, height, _x, _y, _w, _h); - if( posQuirk || sizeQuirk ) { - lRect.origin.x = _x; - lRect.origin.y = _y; - lRect.size.width = _w; - lRect.size.height = _h; - [rootLayer setFrame: lRect]; - } - } - if( NULL != subLayer ) { - CGRect lRect = [subLayer frame]; - int sizeQuirk = 0 != ( NW_DEDICATEDFRAME_QUIRK_SIZE & caLayerQuirks ) && ( lRect.size.width!=width || lRect.size.height!=height ); - CGFloat _x, _y, _w, _h; - int posQuirk = 0 != ( NW_DEDICATEDFRAME_QUIRK_POSITION & caLayerQuirks ) && ( lRect.origin.x!=0 || lRect.origin.y!=0 ); - if( posQuirk ) { - _x = 0; - _y = 0; - } else { - // sub always rel to root - _x = lRect.origin.x; - _y = lRect.origin.y; - } - if( sizeQuirk ) { - _w = width; - _h = height; - } else { - _w = lRect.size.width; - _h = lRect.size.height; - } - DBG_PRINT("CALayer::FixCALayerLayout1.0: Quirks [%d, pos %d, size %d], SubL %p frame %lf/%lf %lfx%lf, usr %dx%d -> %lf/%lf %lfx%lf\n", - caLayerQuirks, posQuirk, sizeQuirk, subLayer, lRect.origin.x, lRect.origin.y, lRect.size.width, lRect.size.height, - width, height, _x, _y, _w, _h); - if( force || posQuirk || sizeQuirk ) { - lRect.origin.x = _x; - lRect.origin.y = _y; - lRect.size.width = _w; - lRect.size.height = _h; - if( [subLayer conformsToProtocol:@protocol(NWDedicatedFrame)] ) { - CALayer * subLayerDS = (CALayer *) subLayer; - [subLayerDS setDedicatedFrame: lRect quirks: caLayerQuirks]; - } else { - [subLayer setFrame: lRect]; - } - } - } -} - /* * Class: Java_jogamp_nativewindow_macosx_OSXUtil * Method: AddCASublayer0 * Signature: (JJIIIII)V */ JNIEXPORT void JNICALL Java_jogamp_nativewindow_macosx_OSXUtil_AddCASublayer0 - (JNIEnv *env, jclass unused, jlong rootCALayer, jlong subCALayer, jint width, jint height, jint caLayerQuirks) + (JNIEnv *env, jclass unused, jlong rootCALayer, jlong subCALayer, jint x, jint y, jint width, jint height, jint caLayerQuirks) { NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; MyCALayer* rootLayer = (MyCALayer*) ((intptr_t) rootCALayer); @@ -513,23 +576,10 @@ JNIEXPORT void JNICALL Java_jogamp_nativewindow_macosx_OSXUtil_AddCASublayer0 [subLayer retain]; // Pairs w/ RemoveCASublayer CGRect lRectRoot = [rootLayer frame]; - int posQuirk = 0 != ( NW_DEDICATEDFRAME_QUIRK_POSITION & caLayerQuirks ); - int sizeQuirk = 0 != ( NW_DEDICATEDFRAME_QUIRK_SIZE & caLayerQuirks ); - - DBG_PRINT("CALayer::AddCASublayer0.0: Quirks [%d, pos %d, size %d], Root %p (refcnt %d), Sub %p (refcnt %d), frame0: %lf/%lf %lfx%lf\n", - caLayerQuirks, posQuirk, sizeQuirk, rootLayer, (int)[rootLayer retainCount], subLayer, (int)[subLayer retainCount], + DBG_PRINT("CALayer::AddCASublayer0.0: Quirks %d, Root %p (refcnt %d), Sub %p (refcnt %d), frame0: %lf/%lf %lfx%lf\n", + caLayerQuirks, rootLayer, (int)[rootLayer retainCount], subLayer, (int)[subLayer retainCount], lRectRoot.origin.x, lRectRoot.origin.y, lRectRoot.size.width, lRectRoot.size.height); - CGPoint origin = lRectRoot.origin; // save - // force root to 0/0 - lRectRoot.origin.x = 0; - lRectRoot.origin.y = 0; - [rootLayer setFrame: lRectRoot]; - - // simple 1:1 layout rel. to root-layer ! - if( !posQuirk ) { - lRectRoot.origin = origin; - } [subLayer setFrame:lRectRoot]; [rootLayer addSublayer:subLayer]; @@ -545,7 +595,7 @@ JNIEXPORT void JNICALL Java_jogamp_nativewindow_macosx_OSXUtil_AddCASublayer0 [subLayer setNeedsDisplayOnBoundsChange: YES]; if( 0 != caLayerQuirks ) { - FixCALayerLayout0(rootLayer, subLayer, width, height, caLayerQuirks, JNI_TRUE); + [rootLayer fixCALayerLayout: subLayer x:x y:y width:width height:height caLayerQuirks:caLayerQuirks force:JNI_TRUE]; } [CATransaction commit]; @@ -561,17 +611,20 @@ JNIEXPORT void JNICALL Java_jogamp_nativewindow_macosx_OSXUtil_AddCASublayer0 * Signature: (JJIII)V */ JNIEXPORT void JNICALL Java_jogamp_nativewindow_macosx_OSXUtil_FixCALayerLayout0 - (JNIEnv *env, jclass unused, jlong rootCALayer, jlong subCALayer, jint width, jint height, jint caLayerQuirks) + (JNIEnv *env, jclass unused, jlong rootCALayer, jlong subCALayer, jint x, jint y, jint width, jint height, jint caLayerQuirks) { if( 0 != caLayerQuirks ) { NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; MyCALayer* rootLayer = (MyCALayer*) ((intptr_t) rootCALayer); + if( NULL == rootLayer ) { + NativewindowCommon_throwNewRuntimeException(env, "Argument \"rootLayer\" is null"); + } CALayer* subLayer = (CALayer*) ((intptr_t) subCALayer); [CATransaction begin]; [CATransaction setValue:(id)kCFBooleanTrue forKey:kCATransactionDisableActions]; - FixCALayerLayout0(rootLayer, subLayer, width, height, caLayerQuirks, JNI_FALSE); + [rootLayer fixCALayerLayout: subLayer x:x y:y width:width height:height caLayerQuirks:caLayerQuirks force:JNI_FALSE]; [CATransaction commit]; diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug816OSXCALayerPosAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug816OSXCALayerPosAWT.java index 48340aa75..358e97622 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug816OSXCALayerPosAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug816OSXCALayerPosAWT.java @@ -33,8 +33,13 @@ import javax.media.opengl.*; import com.jogamp.opengl.util.Animator; import javax.media.opengl.awt.GLCanvas; +import javax.swing.BoundedRangeModel; import javax.swing.BoxLayout; import javax.swing.JFrame; +import javax.swing.JScrollBar; +import javax.swing.JScrollPane; +import javax.swing.JSplitPane; +import javax.swing.ScrollPaneConstants; import com.jogamp.common.util.awt.AWTEDTExecutor; import com.jogamp.newt.event.awt.AWTWindowAdapter; @@ -68,9 +73,15 @@ import org.junit.Test; import org.junit.FixMethodOrder; import org.junit.runners.MethodSorters; +/** + * Bug 816: OSX CALayer Positioning Bug. + *

+ * Diff. OSX CALayer positioning w/ java6, [7uxx..7u40[, and >= 7u40 + *

+ */ @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class TestBug816OSXCALayerPosAWT extends UITestCase { - public enum FrameLayout { None, Flow, DoubleBorderCenterSurrounded, Box }; + public enum FrameLayout { None, Flow, DoubleBorderCenterSurrounded, Box, Split }; static long duration = 1600; // ms static int width, height; @@ -113,7 +124,7 @@ public class TestBug816OSXCALayerPosAWT extends UITestCase { comp2.setPreferredSize(new_sz2); comp2.setSize(new_sz2); } - if( null != frame ) { + if( null != frame ) { frame.pack(); } } } ); @@ -206,6 +217,39 @@ public class TestBug816OSXCALayerPosAWT extends UITestCase { framePane.add(c); } break; + case Split: { + Dimension sbDim = new Dimension(16, 16); + JScrollPane vsp = new JScrollPane(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); + { + JScrollBar vsb = vsp.getVerticalScrollBar(); + vsb.setPreferredSize(sbDim); + BoundedRangeModel model = vsb.getModel(); + model.setMinimum(0); + model.setMaximum(100); + model.setValue(50); + model.setExtent(1); + vsb.setEnabled(true); + } + JScrollPane hsp = new JScrollPane(ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS); + { + JScrollBar hsb = hsp.getHorizontalScrollBar(); + hsb.setPreferredSize(sbDim); + BoundedRangeModel model = hsb.getModel(); + model.setMinimum(0); + model.setMaximum(100); + model.setValue(50); + model.setExtent(1); + hsb.setEnabled(true); + } + JSplitPane horizontalSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, + twoCanvas ? glCanvas2 : vsp, glCanvas1 ); + horizontalSplitPane.setResizeWeight(0.5); + JSplitPane verticalSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, + true, horizontalSplitPane, hsp); + verticalSplitPane.setResizeWeight(0.5); + framePane.add(verticalSplitPane); + } + break; } final GearsES2 demo1 = new GearsES2(swapInterval); glCanvas1.addGLEventListener(demo1); @@ -329,26 +373,40 @@ public class TestBug816OSXCALayerPosAWT extends UITestCase { } @Test - public void test04_Compo_Flow_Two() throws InterruptedException, InvocationTargetException { + public void test04_Compo_Split_One() throws InterruptedException, InvocationTargetException { if( testNum != -1 && testNum != 4 ) { return ; } final GLCapabilities caps = new GLCapabilities(getGLP()); + runTestGL(caps, FrameLayout.Split, false /* twoCanvas */, true /* resizeByComp */); + } + + @Test + public void test05_Compo_Flow_Two() throws InterruptedException, InvocationTargetException { + if( testNum != -1 && testNum != 5 ) { return ; } + final GLCapabilities caps = new GLCapabilities(getGLP()); runTestGL(caps, FrameLayout.Flow, true/* twoCanvas */, true /* resizeByComp */); } @Test - public void test05_Compo_DblBrd_Two() throws InterruptedException, InvocationTargetException { - if( testNum != -1 && testNum != 5 ) { return ; } + public void test06_Compo_DblBrd_Two() throws InterruptedException, InvocationTargetException { + if( testNum != -1 && testNum != 6 ) { return ; } final GLCapabilities caps = new GLCapabilities(getGLP()); runTestGL(caps, FrameLayout.DoubleBorderCenterSurrounded, true/* twoCanvas */, true /* resizeByComp */); } @Test - public void test06_Compo_Box_Two() throws InterruptedException, InvocationTargetException { - if( testNum != -1 && testNum != 6 ) { return ; } + public void test07_Compo_Box_Two() throws InterruptedException, InvocationTargetException { + if( testNum != -1 && testNum != 7 ) { return ; } final GLCapabilities caps = new GLCapabilities(getGLP()); runTestGL(caps, FrameLayout.Box, true/* twoCanvas */, true /* resizeByComp */); } + @Test + public void test08_Compo_Split_Two() throws InterruptedException, InvocationTargetException { + if( testNum != -1 && testNum != 8 ) { return ; } + final GLCapabilities caps = new GLCapabilities(getGLP()); + runTestGL(caps, FrameLayout.Split, true/* twoCanvas */, true /* resizeByComp */); + } + @Test public void test10_Frame_None_One() throws InterruptedException, InvocationTargetException { if( testNum != -1 && testNum != 10 ) { return ; } @@ -378,26 +436,40 @@ public class TestBug816OSXCALayerPosAWT extends UITestCase { } @Test - public void test14_Frame_Flow_Two() throws InterruptedException, InvocationTargetException { - if( testNum != -1 && testNum != 14 ) { return ; } + public void test14_Frame_Split_One() throws InterruptedException, InvocationTargetException { + if( testNum != -1 && testNum != 14) { return ; } + final GLCapabilities caps = new GLCapabilities(getGLP()); + runTestGL(caps, FrameLayout.Split, false /* twoCanvas */, false /* resizeByComp */); + } + + @Test + public void test15_Frame_Flow_Two() throws InterruptedException, InvocationTargetException { + if( testNum != -1 && testNum != 15 ) { return ; } final GLCapabilities caps = new GLCapabilities(getGLP()); runTestGL(caps, FrameLayout.Flow, true/* twoCanvas */, false /* resizeByComp */); } @Test - public void test15_Frame_DblBrd_Two() throws InterruptedException, InvocationTargetException { - if( testNum != -1 && testNum != 15 ) { return ; } + public void test16_Frame_DblBrd_Two() throws InterruptedException, InvocationTargetException { + if( testNum != -1 && testNum != 16 ) { return ; } final GLCapabilities caps = new GLCapabilities(getGLP()); runTestGL(caps, FrameLayout.DoubleBorderCenterSurrounded, true/* twoCanvas */, false /* resizeByComp */); } @Test - public void test16_Frame_Box_Two() throws InterruptedException, InvocationTargetException { - if( testNum != -1 && testNum != 16 ) { return ; } + public void test17_Frame_Box_Two() throws InterruptedException, InvocationTargetException { + if( testNum != -1 && testNum != 17 ) { return ; } final GLCapabilities caps = new GLCapabilities(getGLP()); runTestGL(caps, FrameLayout.Box, true/* twoCanvas */, false /* resizeByComp */); } + @Test + public void test18_Frame_Split_Two() throws InterruptedException, InvocationTargetException { + if( testNum != -1 && testNum != 18 ) { return ; } + final GLCapabilities caps = new GLCapabilities(getGLP()); + runTestGL(caps, FrameLayout.Split, true/* twoCanvas */, false /* resizeByComp */); + } + static int testNum = -1; public static void main(String args[]) { diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/Bug816AppletGLCanvas01.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/Bug816AppletGLCanvas01.java new file mode 100644 index 000000000..175b053d1 --- /dev/null +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/Bug816AppletGLCanvas01.java @@ -0,0 +1,134 @@ +/** + * Copyright 2013 JogAmp Community. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of JogAmp Community. + */ +package com.jogamp.opengl.test.junit.jogl.demos.es2.awt; + +import java.applet.Applet; +import java.awt.Color; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; + +import javax.media.opengl.GL; +import javax.media.opengl.GLAutoDrawable; +import javax.media.opengl.GLCapabilities; +import javax.media.opengl.GLCapabilitiesImmutable; +import javax.media.opengl.GLEventListener; +import javax.media.opengl.GLProfile; +import javax.media.opengl.awt.GLCanvas; +import javax.swing.JFrame; +import javax.swing.JPanel; + +/** + * Bug 816: OSX CALayer Positioning Bug. + *

+ * Diff. OSX CALayer positioning w/ java6, [7uxx..7u40[, and >= 7u40 + *

+ *

+ * Test simply positions a GLCanvas via setBounds(..) within it's Applet. + *

+ */ +@SuppressWarnings("serial") +public class Bug816AppletGLCanvas01 extends Applet implements GLEventListener { + + public Bug816AppletGLCanvas01() { + } + + public static JFrame frame; + public static JPanel appletHolder; + public static boolean isApplet = true; + + static public void main(String args[]) { + Applet myApplet = null; + isApplet = false; + + myApplet = new Bug816AppletGLCanvas01(); + appletStarter(myApplet, "Bug861AppletGLCanvasTest01", 800, 600); + } + + static public void appletStarter(final Applet des, String frameName, int width, int height) { + appletHolder = new JPanel(); + if (frame != null) { + frame.dispose(); + frame = null; + } + frame = new JFrame(frameName); + frame.setVisible(false); + frame.getContentPane().add(appletHolder); + + appletHolder.setLayout(null); + des.setBounds(0, 0, width, height); + appletHolder.add(des); + + frame.setVisible(true); + int frameBorderSize = appletHolder.getLocationOnScreen().x - frame.getLocationOnScreen().x; + int titleBarHeight = appletHolder.getLocationOnScreen().y - frame.getLocationOnScreen().y; + int frameWidth = width + 2 * frameBorderSize; + int frameHeight = height + titleBarHeight + frameBorderSize; + frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + frame.setSize(frameWidth, frameHeight); + frame.setVisible(true); + des.init(); + frame.addWindowListener(new WindowAdapter() { + public void windowClosing(WindowEvent e) { + System.exit(0); + } + }); + } + + public void init() { + initOpenGLAWT(); + } + + public void initOpenGLAWT() { + setBackground(Color.gray); + setLayout(null); + + GLProfile glp = GLProfile.getDefault(); + GLCapabilities caps = new GLCapabilities(glp); + GLCanvas canvas = new GLCanvas((GLCapabilitiesImmutable) caps); + canvas.setBounds(50, 50, 200, 450); + canvas.addGLEventListener(this); + add(canvas); + } + + public void init(GLAutoDrawable gLAutoDrawable) { + GL gl = gLAutoDrawable.getGL(); + gl.glClearColor(1.0f, 0.0f, 0.0f, 1.0f); + gl.glClear(GL.GL_COLOR_BUFFER_BIT); + gLAutoDrawable.swapBuffers(); + } + + public void dispose(GLAutoDrawable glad) { + } + + public void display(GLAutoDrawable glad) { + } + + public void reshape(GLAutoDrawable glad, int i, int i1, int i2, int i3) { + } + +} diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/Bug816AppletGLCanvas02.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/Bug816AppletGLCanvas02.java new file mode 100644 index 000000000..9ae0a2bbd --- /dev/null +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/Bug816AppletGLCanvas02.java @@ -0,0 +1,85 @@ +/** + * Copyright 2013 JogAmp Community. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of JogAmp Community. + */ +package com.jogamp.opengl.test.junit.jogl.demos.es2.awt; + +import java.applet.Applet; +import java.util.ArrayList; +import java.util.List; + +import javax.media.opengl.GLAnimatorControl; +import javax.media.opengl.awt.GLCanvas; +import javax.swing.BoxLayout; + +import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2; +import com.jogamp.opengl.util.Animator; + +/** + * Bug 816: OSX CALayer Positioning Bug. + *

+ * Diff. OSX CALayer positioning w/ java6, [7uxx..7u40[, and >= 7u40 + *

+ *

+ * Test uses a box layout within the Applet. + *

+ */ +@SuppressWarnings("serial") +public class Bug816AppletGLCanvas02 extends Applet { + private List animators = new ArrayList(2); + + @Override + public void init() { + System.err.println("GearsApplet: init() - begin"); + new BoxLayout(this, BoxLayout.X_AXIS); + setSize(600, 300); + add(createCanvas()); + add(createCanvas()); + System.err.println("GearsApplet: init() - end"); + } + + private GLCanvas createCanvas() { + GLCanvas canvas = new GLCanvas(); + canvas.addGLEventListener(new GearsES2(1)); + canvas.setSize(300, 300); + animators.add(new Animator(canvas)); + return canvas; + } + + @Override + public void start() { + for (GLAnimatorControl control : animators) { + control.start(); + } + } + + @Override + public void stop() { + for (GLAnimatorControl control : animators) { + control.stop(); + } + } +} -- cgit v1.2.3 From ebb62e74f9e0dc87d7632cf16ca1bc7554ffcadc Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 27 Sep 2013 20:25:40 +0200 Subject: Test applets .. change font of misc test section. --- jnlp-files/jogl-test-applets.html | 2 ++ 1 file changed, 2 insertions(+) (limited to 'jnlp-files') diff --git a/jnlp-files/jogl-test-applets.html b/jnlp-files/jogl-test-applets.html index 69fb70eca..25dfa416c 100644 --- a/jnlp-files/jogl-test-applets.html +++ b/jnlp-files/jogl-test-applets.html @@ -198,6 +198,7 @@ Click on the Launch link to actually launch the demo.
+

Misc tests:

    @@ -208,6 +209,7 @@ Misc tests:

+
-- cgit v1.2.3 From 51ea4e5d5d212dfef519cf824d6cbf69e41bebc7 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 3 Oct 2013 00:02:20 +0200 Subject: Bug 818 (OSX 10.6.8 NVIDIA GeForce GT 330M): Add unit test (manual applet) --- jnlp-files/jogl-test-applets.html | 4 + .../jogl/demos/gl2/awt/Bug818GLJPanelApplet.java | 308 +++++++++++++++++++++ 2 files changed, 312 insertions(+) create mode 100644 src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/Bug818GLJPanelApplet.java (limited to 'jnlp-files') diff --git a/jnlp-files/jogl-test-applets.html b/jnlp-files/jogl-test-applets.html index 25dfa416c..5f60076bf 100644 --- a/jnlp-files/jogl-test-applets.html +++ b/jnlp-files/jogl-test-applets.html @@ -207,6 +207,10 @@ Misc tests:
  • 01: Custom bounds within applet
  • 02: Box layout within applet
  • +
  • Misc Issues +
  • diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/Bug818GLJPanelApplet.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/Bug818GLJPanelApplet.java new file mode 100644 index 000000000..eed2c7766 --- /dev/null +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/Bug818GLJPanelApplet.java @@ -0,0 +1,308 @@ +/** + * Copyright 2013 JogAmp Community. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of JogAmp Community. + */ +package com.jogamp.opengl.test.junit.jogl.demos.gl2.awt; + +import java.awt.Dimension; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +import java.io.InputStream; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.nio.FloatBuffer; + +import javax.media.opengl.GL; +import javax.media.opengl.GL2; +import javax.media.opengl.GL2ES1; +import javax.media.opengl.GLAutoDrawable; +import javax.media.opengl.GLEventListener; +import javax.media.opengl.awt.GLCanvas; +import javax.media.opengl.awt.GLJPanel; +import javax.media.opengl.fixedfunc.GLLightingFunc; +import javax.media.opengl.fixedfunc.GLMatrixFunc; +import javax.swing.JApplet; +import javax.swing.JPanel; +import javax.swing.JFrame; + +import com.jogamp.common.GlueGenVersion; +import com.jogamp.common.util.JogampVersion; +import com.jogamp.common.util.VersionUtil; +import com.jogamp.opengl.JoglVersion; +import com.jogamp.opengl.util.Animator; +import com.jogamp.opengl.util.texture.Texture; +import com.jogamp.opengl.util.texture.TextureIO; + +/** + * Bug 818: OSX GLJPanel Crash + *
    + *   - NVIDIA GeForce GT 330M
    + *     - GL_VENDOR: "NVIDIA Corporation"
    + *     - GL_RENDERER: "NVIDIA GeForce GT 330M OpenGL Engine"
    + *     - GL_VERSION: "2.1 NVIDIA-8.12.47 310.40.00.05f01"
    + *   - Mac OSX 10.6.8
    + * 
    + */ +public class Bug818GLJPanelApplet extends JApplet { + + private static final long serialVersionUID = 1L; + + private Animator animatorCanvas; + + private Animator animatorPanel; + + public static JFrame frame; + public static JPanel appletHolder; + public static boolean isApplet = true; + + static public void main(String args[]) { + isApplet = false; + + final JApplet myApplet = new Bug818GLJPanelApplet(); + + appletHolder = new JPanel(); + + frame = new JFrame("Bug818GLJPanelApplet"); + frame.getContentPane().add(myApplet); + + frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + frame.addWindowListener(new WindowAdapter() { + public void windowClosing(WindowEvent e) { + System.exit(0); + } + }); + + try { + javax.swing.SwingUtilities.invokeAndWait(new Runnable() { + public void run() { + myApplet.init(); + frame.validate(); + frame.pack(); + frame.setVisible(true); + } } ); + } catch( Throwable throwable ) { + throwable.printStackTrace(); + } + + myApplet.start(); + } + + + @Override + public void init() { + + final JPanel panel = new JPanel(); + setContentPane(panel); + + final GLCanvas glCanvas = new GLCanvas(); + glCanvas.addGLEventListener(new JOGLQuad(true)); + animatorCanvas = new Animator(glCanvas); + glCanvas.setPreferredSize(new Dimension(300, 300)); + panel.add(glCanvas); + + final GLJPanel gljPanel = new GLJPanel(); + gljPanel.addGLEventListener(new JOGLQuad(false)); + animatorPanel = new Animator(gljPanel); + gljPanel.setPreferredSize(new Dimension(300, 300)); + panel.add(gljPanel); + } + + @Override + public void start() { + + animatorCanvas.start(); + animatorCanvas.setUpdateFPSFrames(60, System.err); + animatorPanel.start(); + animatorPanel.setUpdateFPSFrames(60, System.err); + } + + @Override + public void stop() { + + animatorCanvas.stop(); + animatorPanel.stop(); + } + + @Override + public void destroy() {} + + /** + * Self-contained example (within a single class only to keep it simple) displaying a rotating quad + */ + static class JOGLQuad implements GLEventListener { + + private static final float[] VERTEX_DATA = { + -1.0f, 1.0f, 0.0f, // Top Left + 1.0f, 1.0f, 0.0f, // Top Right + 1.0f, -1.0f, 0.0f, // Bottom Right + -1.0f, -1.0f, 0.0f // Bottom Left + }; + + private static final float[] TEXCOORD_DATA = { + 0.0f, 1.0f, // Top Left + 1.0f, 1.0f, // Top Right + 1.0f, 0.0f, // Bottom Right + 0.0f, 0.0f // Bottom Left + }; + + private FloatBuffer vertexBuf; + + private FloatBuffer texCoordBuf; + + private int vertexVBO; + + private int texCoordVBO; + + private float rotateT = 0.0f; + + private boolean canvas; + + private Texture texture; + + JOGLQuad(boolean canvas) { + + this.canvas = canvas; + + ByteBuffer bb = ByteBuffer.allocateDirect(VERTEX_DATA.length * 4); + bb.order(ByteOrder.nativeOrder()); + vertexBuf = bb.asFloatBuffer(); + vertexBuf.put(VERTEX_DATA); + vertexBuf.rewind(); + + bb = ByteBuffer.allocateDirect(TEXCOORD_DATA.length * 4); + bb.order(ByteOrder.nativeOrder()); + texCoordBuf = bb.asFloatBuffer(); + texCoordBuf.put(TEXCOORD_DATA); + texCoordBuf.rewind(); + } + + @Override + public void init(GLAutoDrawable glDrawable) { + + final GL2 gl = glDrawable.getGL().getGL2(); + + System.err.println(VersionUtil.getPlatformInfo()); + System.err.println(JoglVersion.getGLInfo(gl, null, false /* withCapabilitiesAndExtensionInfo */).toString()); + + gl.glShadeModel(GLLightingFunc.GL_SMOOTH); + gl.glClearColor(0.0f, 0.0f, 0.0f, 0.0f); + gl.glClearDepth(1.0f); + gl.glEnable(GL.GL_DEPTH_TEST); + gl.glDepthFunc(GL.GL_LEQUAL); + gl.glHint(GL2ES1.GL_PERSPECTIVE_CORRECTION_HINT, GL.GL_NICEST); + + int[] tmp = new int[2]; + gl.glGenBuffers(tmp.length, tmp, 0); + vertexVBO = tmp[0]; + texCoordVBO = tmp[1]; + + gl.glBindBuffer(GL2.GL_ARRAY_BUFFER, vertexVBO); + gl.glBufferData(GL2.GL_ARRAY_BUFFER, VERTEX_DATA.length * 4, vertexBuf, GL2.GL_STATIC_DRAW); + gl.glBindBuffer(GL2.GL_ARRAY_BUFFER, texCoordVBO); + gl.glBufferData(GL2.GL_ARRAY_BUFFER, TEXCOORD_DATA.length * 4, texCoordBuf, GL2.GL_STATIC_DRAW); + gl.glBindBuffer(GL2.GL_ARRAY_BUFFER, 0); + + try { + InputStream stream = getClass().getClassLoader().getResourceAsStream("com/jogamp/opengl/test/junit/jogl/util/texture/test-ntscN_3-01-160x90-90pct-yuv444-base.jpg"); + texture = TextureIO.newTexture(stream, true, TextureIO.JPG); + } catch (Exception exc) { + exc.printStackTrace(System.err); + } + } + + @Override + public void dispose(GLAutoDrawable drawable) { + + final GL2 gl = drawable.getGL().getGL2(); + int[] tmp = new int[] {vertexVBO, texCoordVBO}; + gl.glGenBuffers(tmp.length, tmp, 0); + } + + @Override + public void reshape(GLAutoDrawable gLDrawable, int x, int y, int width, int height) { + + final GL2 gl = gLDrawable.getGL().getGL2(); + final float aspect = (float) width / (float) height; + gl.glMatrixMode(GLMatrixFunc.GL_PROJECTION); + gl.glLoadIdentity(); + final float fh = 0.5f; + final float fw = fh * aspect; + gl.glFrustumf(-fw, fw, -fh, fh, 1.0f, 1000.0f); + gl.glMatrixMode(GLMatrixFunc.GL_MODELVIEW); + gl.glLoadIdentity(); + } + + @Override + public void display(GLAutoDrawable gLDrawable) { + + final GL2 gl = gLDrawable.getGL().getGL2(); + + gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT); + gl.glLoadIdentity(); + gl.glTranslatef(0.0f, 0.0f, -5.0f); + + // rotate about the three axes + gl.glRotatef(rotateT, 1.0f, 0.0f, 0.0f); + gl.glRotatef(rotateT, 0.0f, 1.0f, 0.0f); + gl.glRotatef(rotateT, 0.0f, 0.0f, 1.0f); + + // set the color of the quad + if (canvas) { + gl.glColor3f(0.2f, 1.0f, 1.0f); + } else { + gl.glColor3f(1.0f, 0.2f, 0.2f); + } + + if (texture != null) { + texture.bind(gl); + texture.enable(gl); + } else { + System.err.println("no texture"); + } + + // Draw A Quad + gl.glEnableClientState(GL2.GL_VERTEX_ARRAY); + gl.glEnableClientState(GL2.GL_TEXTURE_COORD_ARRAY); + gl.glBindBuffer(GL2.GL_ARRAY_BUFFER, vertexVBO); + gl.glVertexPointer(3, GL2.GL_FLOAT, 0, 0); + gl.glBindBuffer(GL2.GL_ARRAY_BUFFER, texCoordVBO); + gl.glTexCoordPointer(2, GL2.GL_FLOAT, 0, 0); + gl.glBindBuffer(GL2.GL_ARRAY_BUFFER, 0); + gl.glDrawArrays(GL2.GL_QUADS, 0, 4); + gl.glDisableClientState(GL2.GL_TEXTURE_COORD_ARRAY); + gl.glDisableClientState(GL2.GL_VERTEX_ARRAY); + + if (texture != null) { + texture.disable(gl); + } + + // increasing rotation for the next iteration + rotateT += 0.2f; + } + + } +} + -- cgit v1.2.3 From abdc28ec9304b39f981c49e2f9554e05aaff9cc3 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 4 Oct 2013 09:25:13 +0200 Subject: Bug 818: Add missing html file for applet unit test of commit 51ea4e5d5d212dfef519cf824d6cbf69e41bebc7 --- jnlp-files/jogl-applet-bug818_gljpanel01.html | 34 +++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 jnlp-files/jogl-applet-bug818_gljpanel01.html (limited to 'jnlp-files') diff --git a/jnlp-files/jogl-applet-bug818_gljpanel01.html b/jnlp-files/jogl-applet-bug818_gljpanel01.html new file mode 100644 index 000000000..2721ac9f4 --- /dev/null +++ b/jnlp-files/jogl-applet-bug818_gljpanel01.html @@ -0,0 +1,34 @@ + + + +Bug818 OSX GLJPanel NV GT330 Crash + + + +

    +Bug818 OSX GLJPanel NV GT330 Crash +

    + +

    + + + + + + + Sorry, no Java support detected. + + + +

    + + -- cgit v1.2.3 From 3a8c4d65f0e6e378738dc0c543173f79d10e5821 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 4 Oct 2013 19:00:28 +0200 Subject: Bug 848: Add test applet ; Bug 816 Bug816AppletGLCanvas02: Remove 2nd Animator ; Fix intendation (TAB -> WS) --- jnlp-files/jogl-applet-bug816_glcanvas02.html | 4 +- jnlp-files/jogl-applet-bug818_gljpanel01.html | 2 +- jnlp-files/jogl-applet-bug848_glcanvas01.html | 32 +++++ .../jogl/demos/es2/awt/Bug816AppletGLCanvas01.java | 150 ++++++++++----------- .../jogl/demos/es2/awt/Bug816AppletGLCanvas02.java | 57 ++++---- .../jogl/demos/es2/awt/Bug848AppletGLCanvas01.java | 86 ++++++++++++ 6 files changed, 222 insertions(+), 109 deletions(-) create mode 100644 jnlp-files/jogl-applet-bug848_glcanvas01.html create mode 100644 src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/Bug848AppletGLCanvas01.java (limited to 'jnlp-files') diff --git a/jnlp-files/jogl-applet-bug816_glcanvas02.html b/jnlp-files/jogl-applet-bug816_glcanvas02.html index 850b9752a..f4958ec1b 100644 --- a/jnlp-files/jogl-applet-bug816_glcanvas02.html +++ b/jnlp-files/jogl-applet-bug816_glcanvas02.html @@ -11,14 +11,14 @@ Bug816 OSX CALayer Pos - Box Layout

    + width="600" height="300"> - + + + +Bug 848: Applet on OSX w/ CALayer and 2 or more GLCanvas may crash + + + +

    +Bug 848: Applet on OSX w/ CALayer and 2 or more GLCanvas may 'crash'. +

    + +

    + + + + + + Sorry, no Java support detected. + + + +

    + + diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/Bug816AppletGLCanvas01.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/Bug816AppletGLCanvas01.java index 175b053d1..4cecd90a1 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/Bug816AppletGLCanvas01.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/Bug816AppletGLCanvas01.java @@ -54,81 +54,81 @@ import javax.swing.JPanel; @SuppressWarnings("serial") public class Bug816AppletGLCanvas01 extends Applet implements GLEventListener { - public Bug816AppletGLCanvas01() { - } - - public static JFrame frame; - public static JPanel appletHolder; - public static boolean isApplet = true; - - static public void main(String args[]) { - Applet myApplet = null; - isApplet = false; - - myApplet = new Bug816AppletGLCanvas01(); - appletStarter(myApplet, "Bug861AppletGLCanvasTest01", 800, 600); - } - - static public void appletStarter(final Applet des, String frameName, int width, int height) { - appletHolder = new JPanel(); - if (frame != null) { - frame.dispose(); - frame = null; + public Bug816AppletGLCanvas01() { + } + + public static JFrame frame; + public static JPanel appletHolder; + public static boolean isApplet = true; + + static public void main(String args[]) { + Applet myApplet = null; + isApplet = false; + + myApplet = new Bug816AppletGLCanvas01(); + appletStarter(myApplet, "Bug861AppletGLCanvasTest01", 800, 600); + } + + static public void appletStarter(final Applet des, String frameName, int width, int height) { + appletHolder = new JPanel(); + if (frame != null) { + frame.dispose(); + frame = null; + } + frame = new JFrame(frameName); + frame.setVisible(false); + frame.getContentPane().add(appletHolder); + + appletHolder.setLayout(null); + des.setBounds(0, 0, width, height); + appletHolder.add(des); + + frame.setVisible(true); + int frameBorderSize = appletHolder.getLocationOnScreen().x - frame.getLocationOnScreen().x; + int titleBarHeight = appletHolder.getLocationOnScreen().y - frame.getLocationOnScreen().y; + int frameWidth = width + 2 * frameBorderSize; + int frameHeight = height + titleBarHeight + frameBorderSize; + frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + frame.setSize(frameWidth, frameHeight); + frame.setVisible(true); + des.init(); + frame.addWindowListener(new WindowAdapter() { + public void windowClosing(WindowEvent e) { + System.exit(0); + } + }); + } + + public void init() { + initOpenGLAWT(); + } + + public void initOpenGLAWT() { + setBackground(Color.gray); + setLayout(null); + + GLProfile glp = GLProfile.getDefault(); + GLCapabilities caps = new GLCapabilities(glp); + GLCanvas canvas = new GLCanvas((GLCapabilitiesImmutable) caps); + canvas.setBounds(50, 50, 200, 450); + canvas.addGLEventListener(this); + add(canvas); + } + + public void init(GLAutoDrawable gLAutoDrawable) { + GL gl = gLAutoDrawable.getGL(); + gl.glClearColor(1.0f, 0.0f, 0.0f, 1.0f); + gl.glClear(GL.GL_COLOR_BUFFER_BIT); + gLAutoDrawable.swapBuffers(); + } + + public void dispose(GLAutoDrawable glad) { + } + + public void display(GLAutoDrawable glad) { + } + + public void reshape(GLAutoDrawable glad, int i, int i1, int i2, int i3) { } - frame = new JFrame(frameName); - frame.setVisible(false); - frame.getContentPane().add(appletHolder); - - appletHolder.setLayout(null); - des.setBounds(0, 0, width, height); - appletHolder.add(des); - - frame.setVisible(true); - int frameBorderSize = appletHolder.getLocationOnScreen().x - frame.getLocationOnScreen().x; - int titleBarHeight = appletHolder.getLocationOnScreen().y - frame.getLocationOnScreen().y; - int frameWidth = width + 2 * frameBorderSize; - int frameHeight = height + titleBarHeight + frameBorderSize; - frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); - frame.setSize(frameWidth, frameHeight); - frame.setVisible(true); - des.init(); - frame.addWindowListener(new WindowAdapter() { - public void windowClosing(WindowEvent e) { - System.exit(0); - } - }); - } - - public void init() { - initOpenGLAWT(); - } - - public void initOpenGLAWT() { - setBackground(Color.gray); - setLayout(null); - - GLProfile glp = GLProfile.getDefault(); - GLCapabilities caps = new GLCapabilities(glp); - GLCanvas canvas = new GLCanvas((GLCapabilitiesImmutable) caps); - canvas.setBounds(50, 50, 200, 450); - canvas.addGLEventListener(this); - add(canvas); - } - - public void init(GLAutoDrawable gLAutoDrawable) { - GL gl = gLAutoDrawable.getGL(); - gl.glClearColor(1.0f, 0.0f, 0.0f, 1.0f); - gl.glClear(GL.GL_COLOR_BUFFER_BIT); - gLAutoDrawable.swapBuffers(); - } - - public void dispose(GLAutoDrawable glad) { - } - - public void display(GLAutoDrawable glad) { - } - - public void reshape(GLAutoDrawable glad, int i, int i1, int i2, int i3) { - } } diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/Bug816AppletGLCanvas02.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/Bug816AppletGLCanvas02.java index 9ae0a2bbd..161f05c8d 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/Bug816AppletGLCanvas02.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/Bug816AppletGLCanvas02.java @@ -28,8 +28,6 @@ package com.jogamp.opengl.test.junit.jogl.demos.es2.awt; import java.applet.Applet; -import java.util.ArrayList; -import java.util.List; import javax.media.opengl.GLAnimatorControl; import javax.media.opengl.awt.GLCanvas; @@ -49,37 +47,34 @@ import com.jogamp.opengl.util.Animator; */ @SuppressWarnings("serial") public class Bug816AppletGLCanvas02 extends Applet { - private List animators = new ArrayList(2); + GLAnimatorControl animator; - @Override - public void init() { - System.err.println("GearsApplet: init() - begin"); - new BoxLayout(this, BoxLayout.X_AXIS); - setSize(600, 300); - add(createCanvas()); - add(createCanvas()); - System.err.println("GearsApplet: init() - end"); - } + @Override + public void init() { + System.err.println("GearsApplet: init() - begin"); + animator = new Animator(); + new BoxLayout(this, BoxLayout.X_AXIS); + setSize(600, 300); + add(createCanvas()); + add(createCanvas()); + System.err.println("GearsApplet: init() - end"); + } - private GLCanvas createCanvas() { - GLCanvas canvas = new GLCanvas(); - canvas.addGLEventListener(new GearsES2(1)); - canvas.setSize(300, 300); - animators.add(new Animator(canvas)); - return canvas; - } + private GLCanvas createCanvas() { + GLCanvas canvas = new GLCanvas(); + canvas.addGLEventListener(new GearsES2(1)); + canvas.setSize(300, 300); + animator.add(canvas); + return canvas; + } - @Override - public void start() { - for (GLAnimatorControl control : animators) { - control.start(); - } - } + @Override + public void start() { + animator.start(); + } - @Override - public void stop() { - for (GLAnimatorControl control : animators) { - control.stop(); - } - } + @Override + public void stop() { + animator.stop(); + } } diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/Bug848AppletGLCanvas01.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/Bug848AppletGLCanvas01.java new file mode 100644 index 000000000..7b7b4e4c4 --- /dev/null +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/Bug848AppletGLCanvas01.java @@ -0,0 +1,86 @@ +/** + * Copyright 2013 JogAmp Community. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of JogAmp Community. + */ +package com.jogamp.opengl.test.junit.jogl.demos.es2.awt; + +import java.applet.Applet; +import java.util.ArrayList; +import java.util.List; + +import javax.media.opengl.GLAnimatorControl; +import javax.media.opengl.awt.GLCanvas; +import javax.swing.BoxLayout; + +import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2; +import com.jogamp.opengl.util.Animator; + +/** + * Bug 848: Applet on OSX w/ CALayer and 2 or more GLCanvas may 'crash'. + *

    + * Test uses 2x3 GLCanvas in a box layout within the Applet. + *

    + */ +@SuppressWarnings("serial") +public class Bug848AppletGLCanvas01 extends Applet { + private List animators = new ArrayList(2); + + @Override + public void init() { + System.err.println("GearsApplet: init() - begin"); + new BoxLayout(this, BoxLayout.X_AXIS); + setSize(900, 600); + add(createCanvas()); + add(createCanvas()); + add(createCanvas()); + add(createCanvas()); + add(createCanvas()); + add(createCanvas()); + System.err.println("GearsApplet: init() - end"); + } + + private GLCanvas createCanvas() { + GLCanvas canvas = new GLCanvas(); + canvas.addGLEventListener(new GearsES2(1)); + canvas.setSize(300, 300); + animators.add(new Animator(canvas)); + return canvas; + } + + @Override + public void start() { + for (GLAnimatorControl control : animators) { + control.start(); + } + } + + @Override + public void stop() { + for (GLAnimatorControl control : animators) { + control.stop(); + } + } +} -- cgit v1.2.3 From 61e47c5683ef038d8684bce56714ae0a514dd697 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 4 Oct 2013 21:08:45 +0200 Subject: Bug 816/848: Cleanup test applet layout/size ; Note Bug 848: Not reproducible after restart of OSX test machine! --- jnlp-files/jogl-applet-bug816_glcanvas02.html | 32 -------- jnlp-files/jogl-applet-bug816_glcanvas02a.html | 32 ++++++++ jnlp-files/jogl-applet-bug816_glcanvas02b.html | 32 ++++++++ jnlp-files/jogl-applet-bug848_glcanvas01.html | 4 +- jnlp-files/jogl-test-applets.html | 4 +- .../jogamp/newt/awt/applet/JOGLNewtApplet1Run.java | 6 +- .../jogl/demos/es2/awt/Bug816AppletGLCanvas02.java | 80 ------------------- .../demos/es2/awt/Bug816AppletGLCanvas02a.java | 89 ++++++++++++++++++++++ .../demos/es2/awt/Bug816AppletGLCanvas02b.java | 89 ++++++++++++++++++++++ .../jogl/demos/es2/awt/Bug848AppletGLCanvas01.java | 14 +++- 10 files changed, 261 insertions(+), 121 deletions(-) delete mode 100644 jnlp-files/jogl-applet-bug816_glcanvas02.html create mode 100644 jnlp-files/jogl-applet-bug816_glcanvas02a.html create mode 100644 jnlp-files/jogl-applet-bug816_glcanvas02b.html delete mode 100644 src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/Bug816AppletGLCanvas02.java create mode 100644 src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/Bug816AppletGLCanvas02a.java create mode 100644 src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/Bug816AppletGLCanvas02b.java (limited to 'jnlp-files') diff --git a/jnlp-files/jogl-applet-bug816_glcanvas02.html b/jnlp-files/jogl-applet-bug816_glcanvas02.html deleted file mode 100644 index f4958ec1b..000000000 --- a/jnlp-files/jogl-applet-bug816_glcanvas02.html +++ /dev/null @@ -1,32 +0,0 @@ - - - -Bug816 OSX CALayer Pos - Box Layout - - - -

    -Bug816 OSX CALayer Pos - Box Layout -

    - -

    - - - - - - Sorry, no Java support detected. - - - -

    - - diff --git a/jnlp-files/jogl-applet-bug816_glcanvas02a.html b/jnlp-files/jogl-applet-bug816_glcanvas02a.html new file mode 100644 index 000000000..79fb22d76 --- /dev/null +++ b/jnlp-files/jogl-applet-bug816_glcanvas02a.html @@ -0,0 +1,32 @@ + + + +Bug816 OSX CALayer Pos - Box Layout + + + +

    +Bug816 OSX CALayer Pos - Box Layout +

    + +

    + + + + + + Sorry, no Java support detected. + + + +

    + + diff --git a/jnlp-files/jogl-applet-bug816_glcanvas02b.html b/jnlp-files/jogl-applet-bug816_glcanvas02b.html new file mode 100644 index 000000000..eb05e84a5 --- /dev/null +++ b/jnlp-files/jogl-applet-bug816_glcanvas02b.html @@ -0,0 +1,32 @@ + + + +Bug816 OSX CALayer Pos - Grid Layout + + + +

    +Bug816 OSX CALayer Pos - Grid Layout +

    + +

    + + + + + + Sorry, no Java support detected. + + + +

    + + diff --git a/jnlp-files/jogl-applet-bug848_glcanvas01.html b/jnlp-files/jogl-applet-bug848_glcanvas01.html index bc6e90dc2..99fa6aa4d 100644 --- a/jnlp-files/jogl-applet-bug848_glcanvas01.html +++ b/jnlp-files/jogl-applet-bug848_glcanvas01.html @@ -11,14 +11,14 @@ Bug 848: Applet on OSX w/ CALayer and 2 or more GLCanvas may 'crash'.

    + width="1024" height="664"> 01: Custom bounds within applet -
  • 02: Box layout within applet
  • +
  • 02a: Box layout within applet
  • +
  • 02b: Grid layout within applet
  • Misc Issues
  • diff --git a/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtApplet1Run.java b/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtApplet1Run.java index 83a129455..c7153840f 100644 --- a/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtApplet1Run.java +++ b/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtApplet1Run.java @@ -252,9 +252,9 @@ public class JOGLNewtApplet1Run extends Applet { System.err.println("GLWindow: "+glWindow); } base.start(); - if( null != newtCanvasAWT && - newtCanvasAWT.isOffscreenLayerSurfaceEnabled() && - 0 != ( JAWTUtil.JAWT_OSX_CALAYER_QUIRK_POSITION & JAWTUtil.getOSXCALayerQuirks() ) ) { + if( null != newtCanvasAWT && + newtCanvasAWT.isOffscreenLayerSurfaceEnabled() && + 0 != ( JAWTUtil.JAWT_OSX_CALAYER_QUIRK_POSITION & JAWTUtil.getOSXCALayerQuirks() ) ) { // force relayout final int cW = newtCanvasAWT.getWidth(); final int cH = newtCanvasAWT.getHeight(); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/Bug816AppletGLCanvas02.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/Bug816AppletGLCanvas02.java deleted file mode 100644 index 161f05c8d..000000000 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/Bug816AppletGLCanvas02.java +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Copyright 2013 JogAmp Community. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are those of the - * authors and should not be interpreted as representing official policies, either expressed - * or implied, of JogAmp Community. - */ -package com.jogamp.opengl.test.junit.jogl.demos.es2.awt; - -import java.applet.Applet; - -import javax.media.opengl.GLAnimatorControl; -import javax.media.opengl.awt.GLCanvas; -import javax.swing.BoxLayout; - -import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2; -import com.jogamp.opengl.util.Animator; - -/** - * Bug 816: OSX CALayer Positioning Bug. - *

    - * Diff. OSX CALayer positioning w/ java6, [7uxx..7u40[, and >= 7u40 - *

    - *

    - * Test uses a box layout within the Applet. - *

    - */ -@SuppressWarnings("serial") -public class Bug816AppletGLCanvas02 extends Applet { - GLAnimatorControl animator; - - @Override - public void init() { - System.err.println("GearsApplet: init() - begin"); - animator = new Animator(); - new BoxLayout(this, BoxLayout.X_AXIS); - setSize(600, 300); - add(createCanvas()); - add(createCanvas()); - System.err.println("GearsApplet: init() - end"); - } - - private GLCanvas createCanvas() { - GLCanvas canvas = new GLCanvas(); - canvas.addGLEventListener(new GearsES2(1)); - canvas.setSize(300, 300); - animator.add(canvas); - return canvas; - } - - @Override - public void start() { - animator.start(); - } - - @Override - public void stop() { - animator.stop(); - } -} diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/Bug816AppletGLCanvas02a.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/Bug816AppletGLCanvas02a.java new file mode 100644 index 000000000..3bbb423fd --- /dev/null +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/Bug816AppletGLCanvas02a.java @@ -0,0 +1,89 @@ +/** + * Copyright 2013 JogAmp Community. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of JogAmp Community. + */ +package com.jogamp.opengl.test.junit.jogl.demos.es2.awt; + +import java.applet.Applet; + +import javax.media.opengl.GLAnimatorControl; +import javax.media.opengl.awt.GLCanvas; +import javax.swing.BoxLayout; + +import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2; +import com.jogamp.opengl.util.Animator; + +/** + * Bug 816: OSX CALayer Positioning Bug. + *

    + * Diff. OSX CALayer positioning w/ java6, [7uxx..7u40[, and >= 7u40 + *

    + *

    + * Test uses a box layout within the Applet. + *

    + */ +@SuppressWarnings("serial") +public class Bug816AppletGLCanvas02a extends Applet { + GLAnimatorControl animator; + boolean added = false; + + @Override + public void init() { + System.err.println("GearsApplet: init() - begin [visible "+isVisible()+", displayable "+isDisplayable()+"] - "+currentThreadName()); + animator = new Animator(); + new BoxLayout(this, BoxLayout.X_AXIS); + setSize(664, 364); + add(createCanvas()); + add(createCanvas()); + System.err.println("GearsApplet: init() - end [visible "+isVisible()+", displayable "+isDisplayable()+"] - "+currentThreadName()); + } + + private GLCanvas createCanvas() { + GLCanvas canvas = new GLCanvas(); + canvas.addGLEventListener(new GearsES2(1)); + canvas.setSize(300, 300); + animator.add(canvas); + return canvas; + } + + String currentThreadName() { + return Thread.currentThread().getName(); + } + + @Override + public void start() { + System.err.println("GearsApplet: start() - begin [visible "+isVisible()+", displayable "+isDisplayable()+"] - "+currentThreadName()); + animator.start(); + animator.setUpdateFPSFrames(60, System.err); + System.err.println("GearsApplet: start() - end [visible "+isVisible()+", displayable "+isDisplayable()+"] - "+currentThreadName()); + } + + @Override + public void stop() { + System.err.println("GearsApplet: stop() - [visible "+isVisible()+", displayable "+isDisplayable()+"] - "+currentThreadName()); + animator.stop(); + } +} diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/Bug816AppletGLCanvas02b.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/Bug816AppletGLCanvas02b.java new file mode 100644 index 000000000..87a7ea4f5 --- /dev/null +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/Bug816AppletGLCanvas02b.java @@ -0,0 +1,89 @@ +/** + * Copyright 2013 JogAmp Community. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of JogAmp Community. + */ +package com.jogamp.opengl.test.junit.jogl.demos.es2.awt; + +import java.applet.Applet; +import java.awt.GridLayout; + +import javax.media.opengl.GLAnimatorControl; +import javax.media.opengl.awt.GLCanvas; + +import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2; +import com.jogamp.opengl.util.Animator; + +/** + * Bug 816: OSX CALayer Positioning Bug. + *

    + * Diff. OSX CALayer positioning w/ java6, [7uxx..7u40[, and >= 7u40 + *

    + *

    + * Test uses a grid layout within the Applet. + *

    + */ +@SuppressWarnings("serial") +public class Bug816AppletGLCanvas02b extends Applet { + GLAnimatorControl animator; + boolean added = false; + + @Override + public void init() { + System.err.println("GearsApplet: init() - begin [visible "+isVisible()+", displayable "+isDisplayable()+"] - "+currentThreadName()); + animator = new Animator(); + this.setLayout(new GridLayout(1, 2)); + setSize(664, 364); + add(createCanvas()); + add(createCanvas()); + System.err.println("GearsApplet: init() - end [visible "+isVisible()+", displayable "+isDisplayable()+"] - "+currentThreadName()); + } + + private GLCanvas createCanvas() { + GLCanvas canvas = new GLCanvas(); + canvas.addGLEventListener(new GearsES2(1)); + canvas.setSize(300, 300); + animator.add(canvas); + return canvas; + } + + String currentThreadName() { + return Thread.currentThread().getName(); + } + + @Override + public void start() { + System.err.println("GearsApplet: start() - begin [visible "+isVisible()+", displayable "+isDisplayable()+"] - "+currentThreadName()); + animator.start(); + animator.setUpdateFPSFrames(60, System.err); + System.err.println("GearsApplet: start() - end [visible "+isVisible()+", displayable "+isDisplayable()+"] - "+currentThreadName()); + } + + @Override + public void stop() { + System.err.println("GearsApplet: stop() - [visible "+isVisible()+", displayable "+isDisplayable()+"] - "+currentThreadName()); + animator.stop(); + } +} diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/Bug848AppletGLCanvas01.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/Bug848AppletGLCanvas01.java index 7b7b4e4c4..89e31cfe9 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/Bug848AppletGLCanvas01.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/Bug848AppletGLCanvas01.java @@ -50,16 +50,16 @@ public class Bug848AppletGLCanvas01 extends Applet { @Override public void init() { - System.err.println("GearsApplet: init() - begin"); + System.err.println("GearsApplet: init() - begin [visible "+isVisible()+", displayable "+isDisplayable()+"] - "+currentThreadName()); new BoxLayout(this, BoxLayout.X_AXIS); - setSize(900, 600); + setSize(1024, 664); add(createCanvas()); add(createCanvas()); add(createCanvas()); add(createCanvas()); add(createCanvas()); add(createCanvas()); - System.err.println("GearsApplet: init() - end"); + System.err.println("GearsApplet: init() - end [visible "+isVisible()+", displayable "+isDisplayable()+"] - "+currentThreadName()); } private GLCanvas createCanvas() { @@ -70,15 +70,23 @@ public class Bug848AppletGLCanvas01 extends Applet { return canvas; } + String currentThreadName() { + return Thread.currentThread().getName(); + } + @Override public void start() { + System.err.println("GearsApplet: start() - begin [visible "+isVisible()+", displayable "+isDisplayable()+"] - "+currentThreadName()); for (GLAnimatorControl control : animators) { control.start(); + control.setUpdateFPSFrames(60, System.err); } + System.err.println("GearsApplet: start() - end [visible "+isVisible()+", displayable "+isDisplayable()+"] - "+currentThreadName()); } @Override public void stop() { + System.err.println("GearsApplet: stop() - [visible "+isVisible()+", displayable "+isDisplayable()+"] - "+currentThreadName()); for (GLAnimatorControl control : animators) { control.stop(); } -- cgit v1.2.3 From 364af76f2ba3e05ba041997e97f4e342fd6f5827 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 9 Oct 2013 07:17:37 +0200 Subject: Bug816 OSX CALayer: Issue w/ JSplitPane within Apple (Firefox, Safari - not appletviewer) when move horizontal slider (vertical: ok) Moving horizontal slider if run as applet (Firefox, Safari - not appletviewer) doesn't move the GLCanvas even though it is resized. --- jnlp-files/jogl-applet-bug816_layerpos03a.html | 32 +++++++ jnlp-files/jogl-applet-bug816_layerpos03b.html | 32 +++++++ jnlp-files/jogl-test-applets.html | 2 + make/scripts/tests.sh | 6 +- .../macosx/MacOSXWindowSystemInterface-calayer.m | 7 +- .../jogl/awt/TestBug816OSXCALayerPos02AWT.java | 5 +- .../es2/awt/Bug816AppletOSXCALayerPos03a.java | 103 +++++++++++++++++++++ .../es2/awt/Bug816AppletOSXCALayerPos03b.java | 101 ++++++++++++++++++++ 8 files changed, 281 insertions(+), 7 deletions(-) create mode 100644 jnlp-files/jogl-applet-bug816_layerpos03a.html create mode 100644 jnlp-files/jogl-applet-bug816_layerpos03b.html create mode 100644 src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/Bug816AppletOSXCALayerPos03a.java create mode 100644 src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/Bug816AppletOSXCALayerPos03b.java (limited to 'jnlp-files') diff --git a/jnlp-files/jogl-applet-bug816_layerpos03a.html b/jnlp-files/jogl-applet-bug816_layerpos03a.html new file mode 100644 index 000000000..432a2b39d --- /dev/null +++ b/jnlp-files/jogl-applet-bug816_layerpos03a.html @@ -0,0 +1,32 @@ + + + +Bug816 OSX CALayer Pos - Applet w/ 1 JRootPanes and 2 JSplitPanes + + + +

    +Bug816 OSX CALayer Pos - AWT Applet w/ 1 JRootPanes and 2 JSplitPanes +

    + +

    + + + + + + Sorry, no Java support detected. + + + +

    + + diff --git a/jnlp-files/jogl-applet-bug816_layerpos03b.html b/jnlp-files/jogl-applet-bug816_layerpos03b.html new file mode 100644 index 000000000..43b13a8df --- /dev/null +++ b/jnlp-files/jogl-applet-bug816_layerpos03b.html @@ -0,0 +1,32 @@ + + + +Bug816 OSX CALayer Pos - JApplet w/ 2 JRootPanes and 2 JSplitPanes + + + +

    +Bug816 OSX CALayer Pos - Swing JApplet w/ 2 JRootPanes and 2 JSplitPanes +

    + +

    + + + + + + Sorry, no Java support detected. + + + +

    + + diff --git a/jnlp-files/jogl-test-applets.html b/jnlp-files/jogl-test-applets.html index be0a5be81..76cd6effe 100644 --- a/jnlp-files/jogl-test-applets.html +++ b/jnlp-files/jogl-test-applets.html @@ -207,6 +207,8 @@ Misc tests:
  • 01: Custom bounds within applet
  • 02a: Box layout within applet
  • 02b: Grid layout within applet
  • +
  • 03a: Applet w/ 1 JRootPanes and 2 JSplitPanes
  • +
  • 03b: JApplet w/ 2 JRootPanes and 2 JSplitPanes
  • Misc Issues