aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-08-30 03:42:27 +0200
committerSven Gothel <[email protected]>2011-08-30 03:42:27 +0200
commit9c64f265f4e3aaef85b7f017493e3695f46e00b3 (patch)
treeea1c1631e0ebf5b08ec72098a70cf1858cdc31c7
parent7f2da7bb878813817efab0eb01bbf274065ef6c6 (diff)
minor: update script / vsync changes in test w/ 2 windows
-rwxr-xr-xmake/scripts/tests.sh8
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/TestGLWindows02NEWTAnimated.java24
2 files changed, 17 insertions, 15 deletions
diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh
index 5ba1c6e0e..d95a75004 100755
--- a/make/scripts/tests.sh
+++ b/make/scripts/tests.sh
@@ -77,7 +77,7 @@ function jrun() {
#D_ARGS="-Djogl.debug.GraphicsConfiguration"
#D_ARGS="-Djogl.debug.GLCanvas -Djogl.debug.GraphicsConfiguration"
#D_ARGS="-Djogl.debug.GLCanvas"
- D_ARGS="-Djogl.debug.DebugGL -Djogl.debug.GLDebugMessageHandler -Djogl.debug.GLSLCode"
+ #D_ARGS="-Djogl.debug.DebugGL -Djogl.debug.GLDebugMessageHandler -Djogl.debug.GLSLCode"
#D_ARGS="-Djogl.debug.DebugGL -Djogl.debug.TraceGL"
#D_ARGS="-Djogl.debug.GLDebugMessageHandler -Dnewt.debug.Window -Dnewt.debug.Display -Dnewt.debug.EDT"
#D_ARGS="-Djogl.debug.GLDebugMessageHandler"
@@ -137,7 +137,9 @@ function testawtmt() {
#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestGLDebug00NEWT $*
#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestGLDebug01NEWT $*
#testawt com.jogamp.opengl.test.junit.jogl.acore.TestGLProfile01NEWT $*
-#testawt com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextListNEWT $*
+#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextListNEWT $*
+#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextVBOES1NEWT $*
+testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextVBOES2NEWT $*
#testnoawt com.jogamp.opengl.test.junit.newt.TestRemoteWindow01NEWT $*
#testnoawt com.jogamp.opengl.test.junit.newt.TestRemoteGLWindows01NEWT $*
#testawt com.jogamp.opengl.test.junit.jogl.demos.gl2.newt.TestGearsNEWT $*
@@ -152,7 +154,7 @@ function testawtmt() {
#testawt com.jogamp.opengl.test.junit.newt.TestScreenMode00NEWT
#testnoawt com.jogamp.opengl.test.junit.newt.TestScreenMode01NEWT
#testnoawt com.jogamp.opengl.test.junit.newt.TestScreenMode02NEWT
-testnoawt com.jogamp.opengl.test.junit.newt.ManualScreenMode03NEWT
+#testnoawt com.jogamp.opengl.test.junit.newt.ManualScreenMode03NEWT
#testawt com.jogamp.opengl.test.junit.newt.TestGLWindows01NEWT -time 1000000
#testawt -Djava.awt.headless=true com.jogamp.opengl.test.junit.newt.TestGLWindows01NEWT
#testnoawt com.jogamp.opengl.test.junit.jogl.swt.TestSWT01GLn $*
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestGLWindows02NEWTAnimated.java b/src/test/com/jogamp/opengl/test/junit/newt/TestGLWindows02NEWTAnimated.java
index 8b7952639..bfc3f43a7 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/TestGLWindows02NEWTAnimated.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestGLWindows02NEWTAnimated.java
@@ -43,7 +43,7 @@ import java.io.IOException;
import com.jogamp.opengl.test.junit.util.UITestCase;
import com.jogamp.opengl.test.junit.util.MiscUtils;
-import com.jogamp.opengl.test.junit.jogl.demos.gl2.Gears;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
public class TestGLWindows02NEWTAnimated extends UITestCase {
static GLProfile glp;
@@ -58,7 +58,7 @@ public class TestGLWindows02NEWTAnimated extends UITestCase {
glp = GLProfile.getDefault();
}
- static GLWindow createWindow(Screen screen, GLCapabilities caps, int width, int height, boolean onscreen, boolean undecorated) {
+ static GLWindow createWindow(Screen screen, GLCapabilities caps, int width, int height, boolean onscreen, boolean undecorated, boolean vsync) {
Assert.assertNotNull(caps);
caps.setOnscreen(onscreen);
// System.out.println("Requested: "+caps);
@@ -78,7 +78,7 @@ public class TestGLWindows02NEWTAnimated extends UITestCase {
Assert.assertNotNull(glWindow);
glWindow.setUndecorated(onscreen && undecorated);
- GLEventListener demo = new Gears();
+ GLEventListener demo = new GearsES2(vsync ? 1 : 0);
setDemoFields(demo, glWindow);
glWindow.addGLEventListener(demo);
glWindow.addWindowListener(new TraceWindowAdapter());
@@ -117,7 +117,7 @@ public class TestGLWindows02NEWTAnimated extends UITestCase {
public void testWindowDecor01Simple() throws InterruptedException {
GLCapabilities caps = new GLCapabilities(glp);
Assert.assertNotNull(caps);
- GLWindow window = createWindow(null, caps, width, height, true /* onscreen */, false /* undecorated */);
+ GLWindow window = createWindow(null, caps, width, height, true /* onscreen */, false /* undecorated */, true /* vsync */);
Animator animator = new Animator(window);
animator.setUpdateFPSFrames(1, null);
Assert.assertTrue(animator.start());
@@ -135,7 +135,7 @@ public class TestGLWindows02NEWTAnimated extends UITestCase {
public void testWindowDecor02DestroyWinTwiceA() throws InterruptedException {
GLCapabilities caps = new GLCapabilities(glp);
Assert.assertNotNull(caps);
- GLWindow window = createWindow(null, caps, width, height, true /* onscreen */, false /* undecorated */);
+ GLWindow window = createWindow(null, caps, width, height, true /* onscreen */, false /* undecorated */, true /* vsync */);
Animator animator = new Animator(window);
animator.setUpdateFPSFrames(1, null);
Assert.assertTrue(animator.start());
@@ -160,11 +160,11 @@ public class TestGLWindows02NEWTAnimated extends UITestCase {
Screen screen = NewtFactory.createScreen(display, 0); // screen 0
Assert.assertNotNull(screen);
- GLWindow window1 = createWindow(screen, caps, width, height, true /* onscreen */, false /* undecorated */);
+ GLWindow window1 = createWindow(screen, caps, width, height, true /* onscreen */, false /* undecorated */, false /* vsync */);
Assert.assertNotNull(window1);
window1.setPosition(0, 0);
- GLWindow window2 = createWindow(screen, caps, width-10, height-10, true /* onscreen */, false /* undecorated */);
+ GLWindow window2 = createWindow(screen, caps, width-10, height-10, true /* onscreen */, false /* undecorated */, true /* vsync */);
Assert.assertNotNull(window2);
window2.setPosition(screen.getWidth()-width, 0);
@@ -196,8 +196,8 @@ public class TestGLWindows02NEWTAnimated extends UITestCase {
Assert.assertEquals(true, animator.isStarted());
Assert.assertEquals(true, animator.isAnimating());
Assert.assertEquals(false, animator.isPaused());
-
- while(animator.isAnimating() && animator.getTotalFPSDuration()<2*durationPerTest) {
+ // animator.resetFPSCounter();
+ while(animator.isAnimating() && animator.getTotalFPSDuration()<durationPerTest+durationPerTest/10) {
Thread.sleep(100);
}
window2.destroy();
@@ -220,13 +220,13 @@ public class TestGLWindows02NEWTAnimated extends UITestCase {
Screen screen1 = NewtFactory.createScreen(display1, 0); // screen 0
Assert.assertNotNull(screen1);
- GLWindow window1 = createWindow(screen1, caps, width, height, true /* onscreen */, false /* undecorated */);
+ GLWindow window1 = createWindow(screen1, caps, width, height, true /* onscreen */, false /* undecorated */, false /* vsync */);
Assert.assertNotNull(window1);
window1.setPosition(0, 0);
Screen screen2 = NewtFactory.createScreen(display2, 0); // screen 0
Assert.assertNotNull(screen2);
- GLWindow window2 = createWindow(screen2, caps, width-10, height-10, true /* onscreen */, false /* undecorated */);
+ GLWindow window2 = createWindow(screen2, caps, width-10, height-10, true /* onscreen */, false /* undecorated */, true /* vsync */);
Assert.assertNotNull(window2);
window2.setPosition(screen2.getWidth()-width, 0);
@@ -259,7 +259,7 @@ public class TestGLWindows02NEWTAnimated extends UITestCase {
Assert.assertEquals(true, animator.isAnimating());
Assert.assertEquals(false, animator.isPaused());
- while(animator.isAnimating() && animator.getTotalFPSDuration()<2*durationPerTest) {
+ while(animator.isAnimating() && animator.getTotalFPSDuration()<durationPerTest+durationPerTest/10) {
Thread.sleep(100);
}
destroyWindow(window2);