aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmake/scripts/tests-win.bat95
-rw-r--r--make/scripts/tests.sh55
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/anim/Bug898AnimatorFromEDTAWT.java (renamed from src/test/com/jogamp/opengl/test/junit/jogl/awt/Bug898AnimatorFromEDTAWT.java)2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/anim/TestAWTCardLayoutAnimatorStartStopBug532.java (renamed from src/test/com/jogamp/opengl/test/junit/jogl/awt/TestAWTCardLayoutAnimatorStartStopBug532.java)2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/anim/TestAnimatorGLJPanel01AWT.java301
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/anim/TestAnimatorGLWindow01NEWT.java267
6 files changed, 654 insertions, 68 deletions
diff --git a/make/scripts/tests-win.bat b/make/scripts/tests-win.bat
index 94bc49c38..f8a0b4ead 100755
--- a/make/scripts/tests-win.bat
+++ b/make/scripts/tests-win.bat
@@ -1,10 +1,45 @@
REM scripts\java-win.bat jogamp.newt.awt.opengl.VersionApplet
REM scripts\java-win.bat com.jogamp.newt.opengl.GLWindow
REM scripts\java-win.bat javax.media.opengl.awt.GLCanvas
+REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.acore.TestMainVersionGLWindowNEWT %*
+
+REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.demos.gl2.newt.TestGearsNewtAWTWrapper %*
+REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.demos.gl2.newt.TestGearsNEWT -time 30000
+REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.demos.es1.newt.TestGearsES1NEWT %*
+REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT %*
+REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT -vsync -time 4000 -x 10 -y 10 -width 100 -height 100 -screen 0
+REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT -vsync -time 40000 -width 100 -height 100 -screen 0 %*
+REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.demos.gl2.awt.TestGearsAWT -time 5000
+REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2GLJPanelAWT %*
+REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2GLJPanelsAWT %*
+REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.demos.es2.awt.DemoGLJPanelPerf02AWT %*
+REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NewtCanvasAWT %*
+REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestLandscapeES2NewtCanvasAWT %*
+REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestElektronenMultipliziererNEWT %*
+REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.demos.gl3.newt.TestGeomShader01TextureGL3NEWT %*
+
+REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.demos.es2.av.MovieSimple %*
+REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.demos.es2.av.MovieCube %*
+REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.demos.es2.TexCubeES2 %*
+
+REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.perf.TestPerf001RawInit00NEWT %*
+REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.perf.TestPerf001GLJPanelInit01AWT %*
+REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.perf.TestPerf001GLJPanelInit02AWT %*
+REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.perf.TestPerf001GLWindowInit03NEWT %*
+
+REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.tile.TestTiledRendering1GL2NEWT %*
+REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.tile.TestTiledRendering2NEWT %*
+REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.tile.TestRandomTiledRendering2GL2NEWT %*
+REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.tile.TestRandomTiledRendering3GL2AWT %*
+REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.tile.TestTiledPrintingGearsAWT %*
+REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.tile.TestTiledPrintingGearsSwingAWT %*
+REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.tile.TestTiledPrintingGearsSwingAWT2 %*
+REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.tile.TestTiledPrintingGearsNewtAWT %*
+REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.tile.TestTiledPrintingNIOImageSwingAWT %*
+
REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.acore.TestGLCapabilities01NEWT %*
REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.acore.TestShutdownCompleteNEWT %*
REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.acore.TestShutdownCompleteAWT %*
-REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.acore.TestMainVersionGLWindowNEWT %*
REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.offscreen.TestOffscreen01GLPBufferNEWT -time 5000
REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextListNEWT %*
@@ -21,11 +56,11 @@ REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.acore.TestSharedConte
REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextNewtAWTBug523 %*
REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextListAWT %*
-REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.acore.TestFBOOffThreadSharedContextMix2DemosES2NEWT $*
-REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.acore.TestFBOOnThreadSharedContext1DemoES2NEWT $*
-REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.acore.TestFBOAutoDrawableFactoryNEWT $*
-REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.acore.TestFBOMix2DemosES2NEWT $*
-REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.acore.TestFBOMRTNEWT01 $*
+REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.acore.TestFBOOffThreadSharedContextMix2DemosES2NEWT %*
+REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.acore.TestFBOOnThreadSharedContext1DemoES2NEWT %*
+REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.acore.TestFBOAutoDrawableFactoryNEWT %*
+REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.acore.TestFBOMix2DemosES2NEWT %*
+REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.acore.TestFBOMRTNEWT01 %*
REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.acore.TestGLAutoDrawableDelegateOnOffscrnCapsNEWT %*
REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.acore.TestGLAutoDrawableGLWindowOnOffscrnCapsNEWT %*
@@ -54,6 +89,12 @@ REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.acore.ect.TestExclusi
REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.acore.ect.TestExclusiveContext11VSyncAnimNEWT %*
REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.acore.ect.TestExclusiveContext12FPSAnimNEWT %*
+scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.acore.anim.TestAnimatorGLWindow01NEWT %*
+REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.acore.anim.TestAnimatorGLJPanel01AWT %*
+REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.acore.anim.TestAnimatorGLCanvas01AWT %*
+REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.acore.anim.TestAWTCardLayoutAnimatorStartStopBug532 %*
+REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.acore.anim.Bug898AnimatorFromEDTAWT %*
+
REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.awt.TestSwingAWT01GLn
REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.awt.TestGLCanvasAWTActionDeadlock00AWT %*
REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.awt.TestGLCanvasAWTActionDeadlock02AWT %*
@@ -65,36 +106,6 @@ REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.awt.TestJScrollPaneMi
REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.awt.TestBug642JSplitPaneMixHwLw01AWT %*
REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.awt.TestIsRealizedConcurrency01AWT %*
-REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.tile.TestTiledRendering1GL2NEWT %*
-REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.tile.TestTiledRendering2NEWT %*
-REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.tile.TestRandomTiledRendering2GL2NEWT %*
-REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.tile.TestRandomTiledRendering3GL2AWT %*
-REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.tile.TestTiledPrintingGearsAWT %*
-REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.tile.TestTiledPrintingGearsSwingAWT %*
-REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.tile.TestTiledPrintingGearsSwingAWT2 %*
-REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.tile.TestTiledPrintingGearsNewtAWT %*
-REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.tile.TestTiledPrintingNIOImageSwingAWT %*
-
-REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.perf.TestPerf001RawInit00NEWT %*
-REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.perf.TestPerf001GLJPanelInit01AWT %*
-scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.perf.TestPerf001GLJPanelInit02AWT %*
-REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.perf.TestPerf001GLWindowInit03NEWT %*
-
-REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.demos.gl2.newt.TestGearsNewtAWTWrapper %*
-REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.demos.gl2.newt.TestGearsNEWT -time 30000
-REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.demos.es1.newt.TestGearsES1NEWT %*
-REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT %*
-REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT -vsync -time 4000 -x 10 -y 10 -width 100 -height 100 -screen 0
-REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT -vsync -time 40000 -width 100 -height 100 -screen 0 %*
-REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.demos.gl2.awt.TestGearsAWT -time 5000
-REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2GLJPanelAWT %*
-REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2GLJPanelsAWT %*
-REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.demos.es2.awt.DemoGLJPanelPerf02AWT %*
-REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NewtCanvasAWT %*
-REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestLandscapeES2NewtCanvasAWT %*
-
-REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestElektronenMultipliziererNEWT %*
-REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.demos.gl3.newt.TestGeomShader01TextureGL3NEWT %*
REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.newt.TestSwingAWTRobotUsageBeforeJOGLInitBug411
REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.glsl.TestTransformFeedbackVaryingsBug407NEWT
REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.glsl.TestGLSLSimple01NEWT -time 2000
@@ -107,11 +118,11 @@ REM scripts\java-win.bat com.jogamp.opengl.test.junit.newt.event.TestNewtKeyCode
REM scripts\java-win.bat com.jogamp.opengl.test.junit.newt.event.TestNewtKeyEventAutoRepeatAWT %*
REM scripts\java-win.bat com.jogamp.opengl.test.junit.newt.event.TestNewtKeyPressReleaseUnmaskRepeatAWT %*
REM scripts\java-win.bat com.jogamp.opengl.test.junit.newt.event.TestNewtKeyCodesAWT %*
-REM scripts\java-win.bat com.jogamp.opengl.test.junit.newt.event.TestNewtEventModifiersNEWTWindowAWT $*
+REM scripts\java-win.bat com.jogamp.opengl.test.junit.newt.event.TestNewtEventModifiersNEWTWindowAWT %*
REM scripts\java-win.bat com.jogamp.opengl.test.junit.newt.event.TestNewtEventModifiersAWTCanvas %*
REM scripts\java-win.bat com.jogamp.opengl.test.junit.newt.event.TestNewtEventModifiersNewtCanvasAWT %*
-REM scripts\java-win.bat com.jogamp.opengl.test.junit.newt.event.TestNewtEventModifiersNewtCanvasAWT $*
-REM scripts\java-win.bat com.jogamp.opengl.test.junit.newt.event.TestNewtEventModifiersNewtCanvasSWTAWT $*
+REM scripts\java-win.bat com.jogamp.opengl.test.junit.newt.event.TestNewtEventModifiersNewtCanvasAWT %*
+REM scripts\java-win.bat com.jogamp.opengl.test.junit.newt.event.TestNewtEventModifiersNewtCanvasSWTAWT %*
REM scripts\java-win.bat com.jogamp.opengl.test.junit.newt.parenting.TestParenting01NEWT %*
REM scripts\java-win.bat com.jogamp.opengl.test.junit.newt.parenting.TestParenting02NEWT %*
@@ -137,7 +148,7 @@ REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGe
REM scripts\java-win.bat com.jogamp.opengl.test.junit.newt.TestWindows01NEWT
REM scripts\java-win.bat com.jogamp.opengl.test.junit.newt.TestGLWindows01NEWT
REM scripts\java-win.bat com.jogamp.opengl.test.junit.newt.TestGLWindows02NEWTAnimated
-REM scripts\java-win.bat com.jogamp.opengl.test.junit.newt.TestGLWindowInvisiblePointer01NEWT $*
+REM scripts\java-win.bat com.jogamp.opengl.test.junit.newt.TestGLWindowInvisiblePointer01NEWT %*
REM scripts\java-win.bat com.jogamp.opengl.test.junit.newt.TestFocus01SwingAWTRobot %*
REM scripts\java-win.bat com.jogamp.opengl.test.junit.newt.TestFocus02SwingAWTRobot %*
REM scripts\java-win.bat com.jogamp.opengl.test.junit.nativewindow.TestRecursiveToolkitLockCORE
@@ -153,10 +164,6 @@ REM scripts\java-win.bat com.jogamp.opengl.test.junit.newt.mm.TestScreenMode02aN
REM scripts\java-win.bat com.jogamp.opengl.test.junit.newt.mm.TestScreenMode02bNEWT %*
REM scripts\java-win.bat com.jogamp.opengl.test.junit.newt.mm.ManualScreenMode03sNEWT %*
-REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.demos.es2.av.MovieSimple %*
-REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.demos.es2.av.MovieCube %*
-REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.demos.es2.TexCubeES2 %*
-
REM scripts\java-win.bat com.jogamp.opengl.test.junit.newt.TestDisplayLifecycle01NEWT
REM scripts\java-win.bat com.jogamp.opengl.test.junit.newt.TestCloseNewtAWT
diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh
index 809099a82..1f4ca9fc7 100644
--- a/make/scripts/tests.sh
+++ b/make/scripts/tests.sh
@@ -297,6 +297,19 @@ function testawtswt() {
}
#
+# Version
+#
+#testawt jogamp.newt.awt.opengl.VersionApplet $*
+#testawt javax.media.opengl.awt.GLCanvas $*
+#testnoawt com.jogamp.nativewindow.NativeWindowVersion $*
+#testnoawt com.jogamp.opengl.JoglVersion $*
+#testnoawt com.jogamp.newt.NewtVersion $*
+#testnoawt com.jogamp.newt.opengl.GLWindow $*
+#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestGLVersionParsing00NEWT $*
+#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestMainVersionGLWindowNEWT $*
+#testawt com.jogamp.opengl.test.junit.jogl.acore.TestMainVersionGLCanvasAWT $*
+
+#
# demos (any TK, more user driven tests)
#
#testnoawt com.jogamp.opengl.test.junit.jogl.demos.es1.newt.TestGearsES1NEWT $*
@@ -337,7 +350,7 @@ function testawtswt() {
#
#testnoawt com.jogamp.opengl.test.junit.jogl.perf.TestPerf001RawInit00NEWT $*
#testawt com.jogamp.opengl.test.junit.jogl.perf.TestPerf001GLJPanelInit01AWT $*
-testawt com.jogamp.opengl.test.junit.jogl.perf.TestPerf001GLJPanelInit02AWT $*
+#testawt com.jogamp.opengl.test.junit.jogl.perf.TestPerf001GLJPanelInit02AWT $*
#testnoawt com.jogamp.opengl.test.junit.jogl.perf.TestPerf001GLWindowInit03NEWT $*
#
@@ -354,13 +367,8 @@ testawt com.jogamp.opengl.test.junit.jogl.perf.TestPerf001GLJPanelInit02AWT $*
#testawt com.jogamp.opengl.test.junit.jogl.tile.TestTiledPrintingNIOImageSwingAWT $*
#
-# core/newt (testnoawt and testawt)
+# CORE [NEWT + AWT] (testnoawt and testawt)
#
-#testnoawt com.jogamp.nativewindow.NativeWindowVersion $*
-#testnoawt com.jogamp.opengl.JoglVersion $*
-#testnoawt com.jogamp.newt.NewtVersion $*
-#testnoawt com.jogamp.newt.opengl.GLWindow $*
-
#testnoawt com.jogamp.opengl.test.junit.jogl.math.TestPMVMatrix01NEWT $*
#testnoawt com.jogamp.opengl.test.junit.jogl.math.TestPMVMatrix02NOUI $*
#testnoawt com.jogamp.opengl.test.junit.jogl.math.TestPMVMatrix03NOUI $*
@@ -369,8 +377,6 @@ testawt com.jogamp.opengl.test.junit.jogl.perf.TestPerf001GLJPanelInit02AWT $*
#testnoawt com.jogamp.opengl.test.junit.jogl.math.TestFloatUtil01MatrixMatrixMultNOUI $*
#testnoawt com.jogamp.opengl.test.junit.jogl.math.TestBinary16NOUI $*
-#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestGLVersionParsing00NEWT $*
-#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestMainVersionGLWindowNEWT $*
#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestGLProfile00NEWT $*
#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestGLProfile01NEWT $*
#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestShutdownCompleteNEWT $*
@@ -401,6 +407,11 @@ testawt com.jogamp.opengl.test.junit.jogl.perf.TestPerf001GLJPanelInit02AWT $*
#testawt com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextNewtAWTBug523 $*
#testawt com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextListAWT $*
+#testawt com.jogamp.opengl.test.junit.jogl.acore.TestFBOAutoDrawableDeadlockAWT $*
+#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 $*
+
#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestFBOOffThreadSharedContextMix2DemosES2NEWT $*
#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestFBOOnThreadSharedContext1DemoES2NEWT $*
#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestFBOAutoDrawableFactoryNEWT $*
@@ -446,10 +457,21 @@ testawt com.jogamp.opengl.test.junit.jogl.perf.TestPerf001GLJPanelInit02AWT $*
#testawt com.jogamp.opengl.test.junit.jogl.acore.TestFBOAutoDrawableDeadlockAWT $*
#testawt com.jogamp.opengl.test.junit.jogl.awt.TestBug461FBOSupersamplingSwingAWT
+#testawt com.jogamp.opengl.test.junit.jogl.awt.TestBug461PBufferSupersamplingSwingAWT
#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestNEWTCloseX11DisplayBug565 $*
#testawt com.jogamp.opengl.test.junit.jogl.acore.TestAWTCloseX11DisplayBug565 $*
+#testnoawt com.jogamp.opengl.test.junit.jogl.acore.anim.TestAnimatorGLWindow01NEWT $*
+#testawt com.jogamp.opengl.test.junit.jogl.acore.anim.TestAnimatorGLJPanel01AWT $*
+#testawt com.jogamp.opengl.test.junit.jogl.acore.anim.TestAnimatorGLCanvas01AWT $*
+#testawt com.jogamp.opengl.test.junit.jogl.acore.anim.TestAWTCardLayoutAnimatorStartStopBug532 $*
+testawt com.jogamp.opengl.test.junit.jogl.acore.anim.Bug898AnimatorFromEDTAWT $*
+
+#
+# NEWT
+#
+
#testnoawt com.jogamp.opengl.test.junit.newt.TestRemoteWindow01NEWT $*
#testnoawt com.jogamp.opengl.test.junit.newt.TestRemoteGLWindows01NEWT $*
@@ -474,16 +496,8 @@ testawt com.jogamp.opengl.test.junit.jogl.perf.TestPerf001GLJPanelInit02AWT $*
#testnoawt com.jogamp.opengl.test.junit.newt.TestGLWindowWarpPointer01NEWT $*
#
-# awt (testawt)
+# AWT
#
-#testawt jogamp.newt.awt.opengl.VersionApplet $*
-#testawt javax.media.opengl.awt.GLCanvas $*
-#testawt com.jogamp.opengl.test.junit.jogl.acore.TestMainVersionGLCanvasAWT $*
-#testawt com.jogamp.opengl.test.junit.jogl.acore.TestFBOAutoDrawableDeadlockAWT $*
-#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.Bug898AnimatorFromEDTAWT $*
#testawt com.jogamp.opengl.test.junit.jogl.awt.TestBug816OSXCALayerPos01AWT $*
#testawt com.jogamp.opengl.test.junit.jogl.awt.TestBug816OSXCALayerPos02AWT $*
#testawt com.jogamp.opengl.test.junit.jogl.awt.TestBug816OSXCALayerPos03aB729AWT $*
@@ -505,12 +519,9 @@ testawt com.jogamp.opengl.test.junit.jogl.perf.TestPerf001GLJPanelInit02AWT $*
#testawt com.jogamp.opengl.test.junit.jogl.awt.TestBug664GLCanvasSetVisibleSwingAWT $*
#testawt com.jogamp.opengl.test.junit.jogl.awt.TestIsRealizedConcurrency01AWT $*
#testawt com.jogamp.opengl.test.junit.jogl.awt.text.TestAWTTextRendererUseVertexArrayBug464
-#testawt com.jogamp.opengl.test.junit.jogl.awt.TestBug461FBOSupersamplingSwingAWT
-#testawt com.jogamp.opengl.test.junit.jogl.awt.TestBug461PBufferSupersamplingSwingAWT
#testawt com.jogamp.opengl.test.junit.jogl.glu.TestBug463ScaleImageMemoryAWT $*
#testawt com.jogamp.opengl.test.junit.jogl.glu.TestBug694ScaleImageUnpackBufferSizeAWT $*
#testawt com.jogamp.opengl.test.junit.jogl.glu.TestBug365TextureGenerateMipMaps $*
-#testawt com.jogamp.opengl.test.junit.jogl.awt.TestAWTCardLayoutAnimatorStartStopBug532 $*
#testawt com.jogamp.opengl.test.junit.jogl.awt.TestGLCanvasAWTActionDeadlock00AWT $*
#testawt com.jogamp.opengl.test.junit.jogl.awt.TestGLCanvasAWTActionDeadlock01AWT $*
#testawt com.jogamp.opengl.test.junit.jogl.awt.TestGLCanvasAWTActionDeadlock02AWT $*
@@ -523,7 +534,7 @@ testawt com.jogamp.opengl.test.junit.jogl.perf.TestPerf001GLJPanelInit02AWT $*
#testawt com.jogamp.opengl.test.bugs.Bug735Inv4AWT $*
#
-# swt (testswt)
+# SWT (testswt)
#
#testswt com.jogamp.opengl.test.junit.jogl.swt.TestSWTEclipseGLCanvas01GLn $*
#testswt com.jogamp.opengl.test.junit.jogl.swt.TestSWTJOGLGLCanvas01GLn $*
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/awt/Bug898AnimatorFromEDTAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/anim/Bug898AnimatorFromEDTAWT.java
index 66cdbc553..55e045d48 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/awt/Bug898AnimatorFromEDTAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/anim/Bug898AnimatorFromEDTAWT.java
@@ -25,7 +25,7 @@
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of JogAmp Community.
*/
-package com.jogamp.opengl.test.junit.jogl.awt;
+package com.jogamp.opengl.test.junit.jogl.acore.anim;
import java.awt.BorderLayout;
import java.awt.Dimension;
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestAWTCardLayoutAnimatorStartStopBug532.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/anim/TestAWTCardLayoutAnimatorStartStopBug532.java
index d757d9522..7f861d89b 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestAWTCardLayoutAnimatorStartStopBug532.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/anim/TestAWTCardLayoutAnimatorStartStopBug532.java
@@ -1,4 +1,4 @@
-package com.jogamp.opengl.test.junit.jogl.awt;
+package com.jogamp.opengl.test.junit.jogl.acore.anim;
import java.awt.BorderLayout;
import java.awt.CardLayout;
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/anim/TestAnimatorGLJPanel01AWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/anim/TestAnimatorGLJPanel01AWT.java
new file mode 100644
index 000000000..42f170a06
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/anim/TestAnimatorGLJPanel01AWT.java
@@ -0,0 +1,301 @@
+/**
+ * Copyright 2010 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.acore.anim;
+
+import java.awt.Frame;
+import java.lang.reflect.InvocationTargetException;
+
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.awt.GLJPanel;
+
+import com.jogamp.opengl.util.Animator;
+import com.jogamp.opengl.test.junit.util.AWTRobotUtil;
+import com.jogamp.opengl.test.junit.util.UITestCase;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.FixMethodOrder;
+import org.junit.runners.MethodSorters;
+
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+public class TestAnimatorGLJPanel01AWT extends UITestCase {
+ static final int width = 640;
+ static final int height = 480;
+
+ protected GLJPanel createGLJPanel(final GLCapabilities caps, final Frame frame, int x, int y, GearsES2 gears) throws InterruptedException {
+ final GLJPanel glCanvas = new GLJPanel(caps);
+ Assert.assertNotNull(glCanvas);
+ glCanvas.addGLEventListener(gears);
+ frame.add(glCanvas);
+ frame.setLocation(x, y);
+ frame.setSize(width, height);
+ frame.setTitle("GLJPanel: "+x+"/"+y);
+ return glCanvas;
+ }
+
+ static void pauseAnimator(Animator animator, boolean pause) {
+ if(pause) {
+ animator.pause();
+ Assert.assertEquals(true, animator.isStarted());
+ Assert.assertEquals(true, animator.isPaused());
+ Assert.assertEquals(false, animator.isAnimating());
+ } else {
+ animator.resume();
+ Assert.assertEquals(true, animator.isStarted());
+ Assert.assertEquals(false, animator.isPaused());
+ Assert.assertEquals(true, animator.isAnimating());
+ }
+ }
+ static void stopAnimator(Animator animator) {
+ animator.stop();
+ Assert.assertEquals(false, animator.isStarted());
+ Assert.assertEquals(false, animator.isPaused());
+ Assert.assertEquals(false, animator.isAnimating());
+ }
+
+ @Test
+ public void test01SyncedOneAnimator() throws InterruptedException, InvocationTargetException {
+ final GLCapabilities caps = new GLCapabilities(null);
+ final Frame f1 = new Frame();
+ final Animator animator = new Animator();
+ animator.start();
+ Assert.assertEquals(true, animator.isStarted());
+ Assert.assertEquals(true, animator.isPaused());
+ Assert.assertEquals(false, animator.isAnimating());
+
+ final GearsES2 g1 = new GearsES2(0);
+ final GLJPanel c1 = createGLJPanel(caps, f1, 0, 0, g1);
+ animator.add(c1);
+ Assert.assertEquals(true, animator.isStarted());
+ Assert.assertEquals(false, animator.isPaused());
+ Assert.assertEquals(true, animator.isAnimating());
+
+ final Frame f2 = new Frame();
+ final GearsES2 g2 = new GearsES2(0);
+ final GLJPanel c2 = createGLJPanel(caps, f2, f1.getX()+width,
+ f1.getY()+0, g2);
+ animator.add(c2);
+
+ final Frame f3 = new Frame();
+ final GearsES2 g3 = new GearsES2(0);
+ final GLJPanel c3 = createGLJPanel(caps, f3, f1.getX()+0,
+ f1.getY()+height, g3);
+ animator.add(c3);
+
+ javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
+ public void run() {
+ f1.setVisible(true);
+ f2.setVisible(true);
+ f3.setVisible(true);
+ } } );
+
+ Assert.assertTrue(AWTRobotUtil.waitForRealized(c1, true));
+ Assert.assertTrue(AWTRobotUtil.waitForVisible(c1, true));
+ Assert.assertTrue(AWTRobotUtil.waitForContextCreated(c1, true));
+ Assert.assertTrue("Gears1 not initialized", g1.waitForInit(true));
+
+ Assert.assertTrue(AWTRobotUtil.waitForRealized(c2, true));
+ Assert.assertTrue(AWTRobotUtil.waitForVisible(c2, true));
+ Assert.assertTrue(AWTRobotUtil.waitForContextCreated(c2, true));
+ Assert.assertTrue("Gears2 not initialized", g2.waitForInit(true));
+
+ Assert.assertTrue(AWTRobotUtil.waitForRealized(c3, true));
+ Assert.assertTrue(AWTRobotUtil.waitForVisible(c3, true));
+ Assert.assertTrue(AWTRobotUtil.waitForContextCreated(c3, true));
+ Assert.assertTrue("Gears3 not initialized", g3.waitForInit(true));
+
+ try {
+ Thread.sleep(duration/3);
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+
+ pauseAnimator(animator, true);
+
+ try {
+ Thread.sleep(duration/3);
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+
+ pauseAnimator(animator, false);
+
+ try {
+ Thread.sleep(duration/3);
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+
+ // Stopped animator allows native windowing system 'repaint' event
+ // to trigger GLAD 'display'
+ stopAnimator(animator);
+
+ javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
+ public void run() {
+ try {
+ f1.dispose();
+ f2.dispose();
+ f3.dispose();
+ } catch (Throwable t) {
+ throw new RuntimeException(t);
+ }
+ }});
+
+ Assert.assertTrue(AWTRobotUtil.waitForRealized(c1, false));
+ Assert.assertTrue(AWTRobotUtil.waitForRealized(c2, false));
+ Assert.assertTrue(AWTRobotUtil.waitForRealized(c3, false));
+ }
+
+ @Test
+ public void test02AsyncEachAnimator() throws InterruptedException, InvocationTargetException {
+ final GLCapabilities caps = new GLCapabilities(null);
+ final Frame f1 = new Frame();
+ final Animator a1 = new Animator();
+ final GearsES2 g1 = new GearsES2(0);
+ final GLJPanel c1 = createGLJPanel(caps, f1, 0, 0, g1);
+ a1.add(c1);
+ a1.start();
+ Assert.assertEquals(true, a1.isStarted());
+ Assert.assertEquals(false, a1.isPaused());
+ Assert.assertEquals(true, a1.isAnimating());
+ javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
+ public void run() {
+ f1.setVisible(true);
+ } } );
+
+ final Frame f2 = new Frame();
+ final Animator a2 = new Animator();
+ final GearsES2 g2 = new GearsES2(0);
+ final GLJPanel c2 = createGLJPanel(caps, f2, f1.getX()+width, f1.getY()+0, g2);
+ a2.add(c2);
+ a2.start();
+ Assert.assertEquals(true, a2.isStarted());
+ Assert.assertEquals(false, a2.isPaused());
+ Assert.assertEquals(true, a2.isAnimating());
+ javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
+ public void run() {
+ f2.setVisible(true);
+ } } );
+
+ final Frame f3 = new Frame();
+ final Animator a3 = new Animator();
+ final GearsES2 g3 = new GearsES2(0);
+ final GLJPanel c3 = createGLJPanel(caps, f3, f1.getX()+0, f1.getY()+height, g3);
+ a3.add(c3);
+ a3.start();
+ Assert.assertEquals(true, a3.isStarted());
+ Assert.assertEquals(false, a3.isPaused());
+ Assert.assertEquals(true, a3.isAnimating());
+ javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
+ public void run() {
+ f3.setVisible(true);
+ } } );
+
+ Assert.assertTrue(AWTRobotUtil.waitForRealized(c1, true));
+ Assert.assertTrue(AWTRobotUtil.waitForVisible(c1, true));
+ Assert.assertTrue(AWTRobotUtil.waitForContextCreated(c1, true));
+ Assert.assertTrue("Gears1 not initialized", g1.waitForInit(true));
+
+ Assert.assertTrue(AWTRobotUtil.waitForRealized(c2, true));
+ Assert.assertTrue(AWTRobotUtil.waitForVisible(c2, true));
+ Assert.assertTrue(AWTRobotUtil.waitForContextCreated(c2, true));
+ Assert.assertTrue("Gears2 not initialized", g2.waitForInit(true));
+
+ Assert.assertTrue(AWTRobotUtil.waitForRealized(c3, true));
+ Assert.assertTrue(AWTRobotUtil.waitForVisible(c3, true));
+ Assert.assertTrue(AWTRobotUtil.waitForContextCreated(c3, true));
+ Assert.assertTrue("Gears3 not initialized", g3.waitForInit(true));
+
+ try {
+ Thread.sleep(duration/3);
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+
+ pauseAnimator(a1, true);
+ pauseAnimator(a2, true);
+ pauseAnimator(a3, true);
+
+ try {
+ Thread.sleep(duration/3);
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+
+ pauseAnimator(a1, false);
+ pauseAnimator(a2, false);
+ pauseAnimator(a3, false);
+
+ try {
+ Thread.sleep(duration/3);
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+
+ // Stopped animator allows native windowing system 'repaint' event
+ // to trigger GLAD 'display'
+ stopAnimator(a1);
+ stopAnimator(a2);
+ stopAnimator(a3);
+
+ javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
+ public void run() {
+ try {
+ f1.dispose();
+ f2.dispose();
+ f3.dispose();
+ } catch (Throwable t) {
+ throw new RuntimeException(t);
+ }
+ }});
+
+ Assert.assertTrue(AWTRobotUtil.waitForRealized(c1, false));
+ Assert.assertTrue(AWTRobotUtil.waitForRealized(c2, false));
+ Assert.assertTrue(AWTRobotUtil.waitForRealized(c3, false));
+ }
+
+ static long duration = 3*500; // ms
+
+ public static void main(String args[]) {
+ for(int i=0; i<args.length; i++) {
+ if(args[i].equals("-time")) {
+ i++;
+ try {
+ duration = Integer.parseInt(args[i]);
+ } catch (Exception ex) { ex.printStackTrace(); }
+ }
+ }
+ /**
+ BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
+ System.err.println("Press enter to continue");
+ System.err.println(stdin.readLine()); */
+ org.junit.runner.JUnitCore.main(TestAnimatorGLJPanel01AWT.class.getName());
+ }
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/anim/TestAnimatorGLWindow01NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/anim/TestAnimatorGLWindow01NEWT.java
new file mode 100644
index 000000000..7b0fbe9ee
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/anim/TestAnimatorGLWindow01NEWT.java
@@ -0,0 +1,267 @@
+/**
+ * Copyright 2010 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.acore.anim;
+
+import java.lang.reflect.InvocationTargetException;
+
+import javax.media.opengl.GLCapabilities;
+
+import com.jogamp.newt.opengl.GLWindow;
+import com.jogamp.opengl.util.Animator;
+import com.jogamp.opengl.test.junit.util.AWTRobotUtil;
+import com.jogamp.opengl.test.junit.util.UITestCase;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.FixMethodOrder;
+import org.junit.runners.MethodSorters;
+
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+public class TestAnimatorGLWindow01NEWT extends UITestCase {
+ static final int width = 640;
+ static final int height = 480;
+
+ protected GLWindow createGLWindow(final GLCapabilities caps, int x, int y, GearsES2 gears) throws InterruptedException {
+ final GLWindow glWindow = GLWindow.create(caps);
+ Assert.assertNotNull(glWindow);
+ glWindow.addGLEventListener(gears);
+ glWindow.setPosition(x, y);
+ glWindow.setSize(width, height);
+ glWindow.setTitle("GLWindow: "+x+"/"+y);
+ return glWindow;
+ }
+
+ static void pauseAnimator(Animator animator, boolean pause) {
+ if(pause) {
+ animator.pause();
+ Assert.assertEquals(true, animator.isStarted());
+ Assert.assertEquals(true, animator.isPaused());
+ Assert.assertEquals(false, animator.isAnimating());
+ } else {
+ animator.resume();
+ Assert.assertEquals(true, animator.isStarted());
+ Assert.assertEquals(false, animator.isPaused());
+ Assert.assertEquals(true, animator.isAnimating());
+ }
+ }
+ static void stopAnimator(Animator animator) {
+ animator.stop();
+ Assert.assertEquals(false, animator.isStarted());
+ Assert.assertEquals(false, animator.isPaused());
+ Assert.assertEquals(false, animator.isAnimating());
+ }
+
+ @Test
+ public void test01SyncedOneAnimator() throws InterruptedException, InvocationTargetException {
+ final GLCapabilities caps = new GLCapabilities(null);
+ final Animator animator = new Animator();
+ animator.start();
+ Assert.assertEquals(true, animator.isStarted());
+ Assert.assertEquals(true, animator.isPaused());
+ Assert.assertEquals(false, animator.isAnimating());
+
+ final GearsES2 g1 = new GearsES2(0);
+ final GLWindow c1 = createGLWindow(caps, 0, 0, g1);
+ animator.add(c1);
+ Assert.assertEquals(true, animator.isStarted());
+ Assert.assertEquals(false, animator.isPaused());
+ Assert.assertEquals(true, animator.isAnimating());
+
+ final GearsES2 g2 = new GearsES2(0);
+ final GLWindow c2 = createGLWindow(caps, c1.getX()+width,
+ c1.getY()+0, g2);
+ animator.add(c2);
+
+ final GearsES2 g3 = new GearsES2(0);
+ final GLWindow c3 = createGLWindow(caps, c1.getX()+0,
+ c1.getY()+height, g3);
+ animator.add(c3);
+
+ c1.setVisible(true);
+ c2.setVisible(true);
+ c3.setVisible(true);
+
+ Assert.assertTrue(AWTRobotUtil.waitForRealized(c1, true));
+ Assert.assertTrue(AWTRobotUtil.waitForVisible(c1, true));
+ Assert.assertTrue(AWTRobotUtil.waitForContextCreated(c1, true));
+ Assert.assertTrue("Gears1 not initialized", g1.waitForInit(true));
+
+ Assert.assertTrue(AWTRobotUtil.waitForRealized(c2, true));
+ Assert.assertTrue(AWTRobotUtil.waitForVisible(c2, true));
+ Assert.assertTrue(AWTRobotUtil.waitForContextCreated(c2, true));
+ Assert.assertTrue("Gears2 not initialized", g2.waitForInit(true));
+
+ Assert.assertTrue(AWTRobotUtil.waitForRealized(c3, true));
+ Assert.assertTrue(AWTRobotUtil.waitForVisible(c3, true));
+ Assert.assertTrue(AWTRobotUtil.waitForContextCreated(c3, true));
+ Assert.assertTrue("Gears3 not initialized", g3.waitForInit(true));
+
+ try {
+ Thread.sleep(duration/3);
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+
+ pauseAnimator(animator, true);
+
+ try {
+ Thread.sleep(duration/3);
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+
+ pauseAnimator(animator, false);
+
+ try {
+ Thread.sleep(duration/3);
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+
+ // Stopped animator allows native windowing system 'repaint' event
+ // to trigger GLAD 'display'
+ stopAnimator(animator);
+
+ c1.destroy();
+ c2.destroy();
+ c3.destroy();
+
+ Assert.assertTrue(AWTRobotUtil.waitForRealized(c1, false));
+ Assert.assertTrue(AWTRobotUtil.waitForRealized(c2, false));
+ Assert.assertTrue(AWTRobotUtil.waitForRealized(c3, false));
+ }
+
+ @Test
+ public void test02AsyncEachAnimator() throws InterruptedException, InvocationTargetException {
+ final GLCapabilities caps = new GLCapabilities(null);
+ final Animator a1 = new Animator();
+ final GearsES2 g1 = new GearsES2(0);
+ final GLWindow c1 = createGLWindow(caps, 0, 0, g1);
+ a1.add(c1);
+ a1.start();
+ Assert.assertEquals(true, a1.isStarted());
+ Assert.assertEquals(false, a1.isPaused());
+ Assert.assertEquals(true, a1.isAnimating());
+ c1.setVisible(true);
+
+ final Animator a2 = new Animator();
+ final GearsES2 g2 = new GearsES2(0);
+ final GLWindow c2 = createGLWindow(caps, c1.getX()+width, c1.getY()+0, g2);
+ a2.add(c2);
+ a2.start();
+ Assert.assertEquals(true, a2.isStarted());
+ Assert.assertEquals(false, a2.isPaused());
+ Assert.assertEquals(true, a2.isAnimating());
+ c2.setVisible(true);
+
+ final Animator a3 = new Animator();
+ final GearsES2 g3 = new GearsES2(0);
+ final GLWindow c3 = createGLWindow(caps, c1.getX()+0, c1.getY()+height, g3);
+ a3.add(c3);
+ a3.start();
+ Assert.assertEquals(true, a3.isStarted());
+ Assert.assertEquals(false, a3.isPaused());
+ Assert.assertEquals(true, a3.isAnimating());
+ c3.setVisible(true);
+
+ Assert.assertTrue(AWTRobotUtil.waitForRealized(c1, true));
+ Assert.assertTrue(AWTRobotUtil.waitForVisible(c1, true));
+ Assert.assertTrue(AWTRobotUtil.waitForContextCreated(c1, true));
+ Assert.assertTrue("Gears1 not initialized", g1.waitForInit(true));
+
+ Assert.assertTrue(AWTRobotUtil.waitForRealized(c2, true));
+ Assert.assertTrue(AWTRobotUtil.waitForVisible(c2, true));
+ Assert.assertTrue(AWTRobotUtil.waitForContextCreated(c2, true));
+ Assert.assertTrue("Gears2 not initialized", g2.waitForInit(true));
+
+ Assert.assertTrue(AWTRobotUtil.waitForRealized(c3, true));
+ Assert.assertTrue(AWTRobotUtil.waitForVisible(c3, true));
+ Assert.assertTrue(AWTRobotUtil.waitForContextCreated(c3, true));
+ Assert.assertTrue("Gears3 not initialized", g3.waitForInit(true));
+
+ try {
+ Thread.sleep(duration/3);
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+
+ pauseAnimator(a1, true);
+ pauseAnimator(a2, true);
+ pauseAnimator(a3, true);
+
+ try {
+ Thread.sleep(duration/3);
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+
+ pauseAnimator(a1, false);
+ pauseAnimator(a2, false);
+ pauseAnimator(a3, false);
+
+ try {
+ Thread.sleep(duration/3);
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+
+ // Stopped animator allows native windowing system 'repaint' event
+ // to trigger GLAD 'display'
+ stopAnimator(a1);
+ stopAnimator(a2);
+ stopAnimator(a3);
+
+ c1.destroy();
+ c2.destroy();
+ c3.destroy();
+
+ Assert.assertTrue(AWTRobotUtil.waitForRealized(c1, false));
+ Assert.assertTrue(AWTRobotUtil.waitForRealized(c2, false));
+ Assert.assertTrue(AWTRobotUtil.waitForRealized(c3, false));
+ }
+
+ static long duration = 3*500; // ms
+
+ public static void main(String args[]) {
+ for(int i=0; i<args.length; i++) {
+ if(args[i].equals("-time")) {
+ i++;
+ try {
+ duration = Integer.parseInt(args[i]);
+ } catch (Exception ex) { ex.printStackTrace(); }
+ }
+ }
+ /**
+ BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
+ System.err.println("Press enter to continue");
+ System.err.println(stdin.readLine()); */
+ org.junit.runner.JUnitCore.main(TestAnimatorGLWindow01NEWT.class.getName());
+ }
+}