diff options
Diffstat (limited to 'src/test/com')
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieSimple.java | 2 | ||||
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestGearsES2NEWT.java | 18 |
2 files changed, 13 insertions, 7 deletions
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 0676a5a82..25ce93597 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 @@ -186,7 +186,7 @@ public class MovieSimple implements GLEventListener { final float aspect = (float)mPlayer.getWidth() / (float)mPlayer.getHeight(); final String ptsPrec = null != regionFPS ? "3.1" : "3.0"; - final String text1 = String.format("%0"+ptsPrec+"f/%0"+ptsPrec+"f s, %s (%01.2fx, vol %01.2f), a %01.2f, fps %02.1f -> %02.1f / %02.1f, v-sync %d", + final String text1 = String.format("%0"+ptsPrec+"f/%0"+ptsPrec+"f s, %s (%01.2fx, vol %01.2f), a %01.2f, fps %02.1f -> %02.1f / %02.1f, v-sync %b", pts, mPlayer.getDuration() / 1000f, mPlayer.getState().toString().toLowerCase(), mPlayer.getPlaySpeed(), mPlayer.getAudioVolume(), aspect, mPlayer.getFramerate(), lfps, tfps, swapIntervalSet); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestGearsES2NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestGearsES2NEWT.java index 4d37445ef..9098c3ea8 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestGearsES2NEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestGearsES2NEWT.java @@ -102,7 +102,7 @@ public class TestGearsES2NEWT extends UITestCase { static boolean forceES3 = false; static boolean forceGL3 = false; static boolean forceGL2 = false; - static boolean demo2 = false; + static int demoType = 1; static boolean manualTest = false; static boolean exclusiveContext = false; static boolean useAnimator = true; @@ -144,16 +144,20 @@ public class TestGearsES2NEWT extends UITestCase { glWindow.confinePointer(mouseConfined); final GLEventListener demo; - if( demo2 ) { + if( 2 == demoType ) { final LineSquareXDemoES2 demo2 = new LineSquareXDemoES2(false); demo = demo2; - } else { + } else if( 1 == demoType ) { final GearsES2 gearsES2 = new GearsES2(swapInterval); gearsES2.setUseMappedBuffers(useMappedBuffers); gearsES2.setValidateBuffers(true); demo = gearsES2; + } else { + demo = null; + } + if( null != demo ) { + glWindow.addGLEventListener(demo); } - glWindow.addGLEventListener(demo); final SnapshotGLEventListener snap = new SnapshotGLEventListener(); glWindow.addGLEventListener(snap); @@ -506,8 +510,9 @@ public class TestGearsES2NEWT extends UITestCase { sysExit = SysExit.valueOf(args[i]); } else if(args[i].equals("-manual")) { manualTest = true; - } else if(args[i].equals("-demo2")) { - demo2 = true; + } else if(args[i].equals("-demo")) { + i++; + demoType = MiscUtils.atoi(args[i], 0); } } wsize = new Dimension(w, h); @@ -546,6 +551,7 @@ public class TestGearsES2NEWT extends UITestCase { System.err.println("useAnimator "+useAnimator); System.err.println("sysExitWithin "+sysExit); System.err.println("mappedBuffers "+useMappedBuffers); + System.err.println("demoType "+demoType); if(waitForKey) { JunitTracer.waitForKey("Start"); |