summaryrefslogtreecommitdiffstats
path: root/src/test/com/jogamp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-04-21 21:18:55 +0200
committerSven Gothel <[email protected]>2012-04-21 21:18:55 +0200
commit77a831891ec9d2251005c1c6a71c8bacc6a5dc26 (patch)
tree50b805439989a02455e1e424d32b3d5c044e9a4c /src/test/com/jogamp
parent4fe8f07c82d531fbdc88e60a7c319fc462522cd2 (diff)
Test: Added commented-out hacks for gdb invocation, OSX NSZombieEnabled env, and custom lib path; MovieCube: '-wait' to wait for debugger.
Diffstat (limited to 'src/test/com/jogamp')
-rwxr-xr-xsrc/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieCube.java21
1 files changed, 17 insertions, 4 deletions
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 9ecb15018..090b947d9 100755
--- 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
@@ -33,7 +33,9 @@
package com.jogamp.opengl.test.junit.jogl.demos.es2.av;
+import java.io.BufferedReader;
import java.io.IOException;
+import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
@@ -61,6 +63,7 @@ import com.jogamp.opengl.util.av.GLMediaPlayer.GLMediaEventListener;
import com.jogamp.opengl.util.av.GLMediaPlayerFactory;
public class MovieCube implements GLEventListener, GLMediaEventListener {
+ static boolean waitForKey = false;
GLWindow window;
boolean quit = false;
TexCubeES2 cube=null;
@@ -128,6 +131,13 @@ public class MovieCube implements GLEventListener, GLMediaEventListener {
GL2ES2 gl = drawable.getGL().getGL2ES2();
System.err.println(JoglVersion.getGLInfo(gl, null));
+ if(waitForKey) {
+ BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
+ System.err.println("Press enter to continue");
+ try {
+ System.err.println(stdin.readLine());
+ } catch (IOException e) { }
+ }
try {
System.out.println("p0 "+mPlayer);
mPlayer.initGLStream(gl, stream);
@@ -159,6 +169,7 @@ public class MovieCube implements GLEventListener, GLMediaEventListener {
}
public void dispose(GLAutoDrawable drawable) {
+ System.err.println(Thread.currentThread()+" MovieCube.dispose ... ");
if(null == mPlayer) { return; }
mPlayer.stop();
GL2ES2 gl = drawable.getGL().getGL2ES2();
@@ -176,7 +187,7 @@ public class MovieCube implements GLEventListener, GLMediaEventListener {
public void displayChanged(javax.media.opengl.GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {
}
- public static void main(String[] args) throws MalformedURLException, IOException {
+ public static void main(String[] args) throws MalformedURLException, IOException, InterruptedException {
int width = 510;
int height = 300;
System.err.println("TexCubeES2.run()");
@@ -192,6 +203,8 @@ public class MovieCube implements GLEventListener, GLMediaEventListener {
} else if(args[i].equals("-url")) {
i++;
url_s = args[i];
+ } else if(args[i].equals("-wait")) {
+ waitForKey = true;
}
}
final MovieCube mc = new MovieCube(new URL(url_s).openConnection(), -2.3f, 0f, 0f);
@@ -202,15 +215,15 @@ public class MovieCube implements GLEventListener, GLMediaEventListener {
window.setFullscreen(false);
window.setSize(width, height);
window.addGLEventListener(mc);
- window.setVisible(true);
final Animator anim = new Animator(window);
- // anim.setUpdateFPSFrames(60, System.err);
- anim.start();
window.addWindowListener(new WindowAdapter() {
public void windowDestroyed(WindowEvent e) {
anim.stop();
}
});
+ // anim.setUpdateFPSFrames(60, System.err);
+ anim.start();
+ window.setVisible(true);
}
}