From 30b2490eef5069214eb6cc0c1b18ddb62c15123b Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 20 Mar 2013 10:58:07 +0100 Subject: TestGearsES2NEWT/TestGearsES2NewtCanvasAWT: Add -noanim option to manually validate Bug 649 --- make/scripts/tests.sh | 9 +++-- .../jogl/demos/es2/newt/TestGearsES2NEWT.java | 43 +++++++++++++++------- .../demos/es2/newt/TestGearsES2NewtCanvasAWT.java | 43 +++++++++++++++------- 3 files changed, 64 insertions(+), 31 deletions(-) diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh index d897d7331..7dfca6e6f 100755 --- a/make/scripts/tests.sh +++ b/make/scripts/tests.sh @@ -198,7 +198,7 @@ function jrun() { #D_ARGS="-Djogl.debug.GLContext -Dnewt.debug=all" #D_ARGS="-Dnewt.debug=all" #D_ARGS="-Djogl.debug.GLCanvas -Djogl.debug.GLJPanel" - D_ARGS="-Djogl.debug.PNGImage" + #D_ARGS="-Djogl.debug.PNGImage" #X_ARGS="-Dsun.java2d.noddraw=True -Dsun.java2d.opengl=True -Dsun.java2d.xrender=false" #X_ARGS="-Dsun.java2d.noddraw=True -Dsun.java2d.opengl=false -Dsun.java2d.xrender=false" #X_ARGS="-verbose:jni" @@ -271,7 +271,7 @@ function testawtswt() { #testnoawt com.jogamp.opengl.test.junit.jogl.demos.es1.newt.TestOlympicES1NEWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.demos.es1.newt.TestRedSquareES1NEWT $* #testawt com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2AWT $* -#testawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NewtCanvasAWT $* +testawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NewtCanvasAWT $* #testawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT $* #testawtswt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NewtCanvasSWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.av.MovieCube $* @@ -498,7 +498,7 @@ function testawtswt() { #testnoawt com.jogamp.opengl.test.junit.jogl.util.TestPNGImage01NEWT $* #testawt com.jogamp.opengl.test.junit.jogl.util.texture.TestTexture01AWT #testawt com.jogamp.opengl.test.junit.jogl.util.texture.TestPNGTextureFromFileAWT $* -testnoawt com.jogamp.opengl.test.junit.jogl.util.texture.TestPNGTextureFromFileNEWT $* +#testnoawt com.jogamp.opengl.test.junit.jogl.util.texture.TestPNGTextureFromFileNEWT $* #testawt com.jogamp.opengl.test.junit.jogl.util.texture.TestGLReadBufferUtilTextureIOWrite01AWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.util.texture.TestGLReadBufferUtilTextureIOWrite01NEWT $* #testawt com.jogamp.opengl.test.junit.jogl.util.texture.TestGLReadBufferUtilTextureIOWrite02AWT $* @@ -559,6 +559,9 @@ testnoawt com.jogamp.opengl.test.junit.jogl.util.texture.TestPNGTextureFromFileN # OSX Java6 NEWT # +# Freeze +#testnoawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting01NEWT $* + # Cut-off top #testnoawt com.jogamp.opengl.test.junit.jogl.util.TestPNGImage01NEWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.util.texture.TestPNGTextureFromFileNEWT $* 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 14b1f04b0..5dee22e1d 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 @@ -89,6 +89,7 @@ public class TestGearsES2NEWT extends UITestCase { static boolean forceGL3 = false; static boolean mainRun = false; static boolean exclusiveContext = false; + static boolean useAnimator = true; @BeforeClass public static void initClass() { @@ -138,9 +139,11 @@ public class TestGearsES2NEWT extends UITestCase { }); } - Animator animator = new Animator(); - animator.setModeBits(false, Animator.MODE_EXPECT_AWT_RENDERING_THREAD); - animator.setExclusiveContext(exclusiveContext); + final Animator animator = useAnimator ? new Animator() : null; + if( useAnimator ) { + animator.setModeBits(false, Animator.MODE_EXPECT_AWT_RENDERING_THREAD); + animator.setExclusiveContext(exclusiveContext); + } QuitAdapter quitAdapter = new QuitAdapter(); //glWindow.addKeyListener(new TraceKeyAdapter(quitAdapter)); @@ -246,14 +249,18 @@ public class TestGearsES2NEWT extends UITestCase { } }); - animator.add(glWindow); - animator.start(); - Assert.assertTrue(animator.isStarted()); - Assert.assertTrue(animator.isAnimating()); - Assert.assertEquals(exclusiveContext ? animator.getThread() : null, glWindow.getExclusiveContextThread()); + if( useAnimator ) { + animator.add(glWindow); + animator.start(); + Assert.assertTrue(animator.isStarted()); + Assert.assertTrue(animator.isAnimating()); + Assert.assertEquals(exclusiveContext ? animator.getThread() : null, glWindow.getExclusiveContextThread()); + } glWindow.setVisible(true); - animator.setUpdateFPSFrames(60, showFPS ? System.err : null); + if( useAnimator ) { + animator.setUpdateFPSFrames(60, showFPS ? System.err : null); + } System.err.println("NW chosen: "+glWindow.getDelegatedWindow().getChosenCapabilities()); System.err.println("GL chosen: "+glWindow.getChosenCapabilities()); @@ -265,14 +272,19 @@ public class TestGearsES2NEWT extends UITestCase { System.err.println("window resize pos/siz: "+glWindow.getX()+"/"+glWindow.getY()+" "+glWindow.getWidth()+"x"+glWindow.getHeight()+", "+glWindow.getInsets()); } - while(!quitAdapter.shouldQuit() && animator.isAnimating() && animator.getTotalFPSDuration() pos/siz: "+glWindow.getX()+"/"+glWindow.getY()+" "+glWindow.getWidth()+"x"+glWindow.getHeight()+", "+glWindow.getInsets()); } - while(!quitAdapter.shouldQuit() && animator.getTotalFPSDuration()