From 3e5c410e1d0ae42c68a7ab1342a7da96ef523a4b Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 3 Sep 2015 18:21:36 +0200 Subject: Bug 1211 TestBug1211IRQ00NEWT: Fix using durationTest01; Make createWindow(..) analog to GLWindow.main(..) --- .../test/junit/newt/TestBug1211IRQ00NEWT.java | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'src/test/com') diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestBug1211IRQ00NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestBug1211IRQ00NEWT.java index 33f119b6f..2487b3e79 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/TestBug1211IRQ00NEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/TestBug1211IRQ00NEWT.java @@ -69,26 +69,21 @@ public class TestBug1211IRQ00NEWT extends UITestCase { glp = GLProfile.getDefault(); } - static GLWindow createWindow(final Screen screen, final GLCapabilitiesImmutable caps) { + static GLWindow createWindow(final GLCapabilitiesImmutable caps) { Assert.assertNotNull(caps); // // Create native windowing resources .. X11/Win/OSX // - GLWindow glWindow; - if(null!=screen) { - glWindow = GLWindow.create(screen, caps); - Assert.assertNotNull(glWindow); - } else { - glWindow = GLWindow.create(caps); - Assert.assertNotNull(glWindow); - } + final GLWindow glWindow = GLWindow.create(caps); + Assert.assertNotNull(glWindow); + glWindow.setSize(width, height); + glWindow.setUpdateFPSFrames(1, null); final GearsES2 demo = new GearsES2(); demo.setVerbose(false); glWindow.addGLEventListener(demo); - glWindow.setSize(width, height); return glWindow; } @@ -123,7 +118,7 @@ public class TestBug1211IRQ00NEWT extends UITestCase { public void run() { final GLCapabilities caps = new GLCapabilities(glp); Assert.assertNotNull(caps); - final GLWindow window1 = createWindow(null, caps); // local + final GLWindow window1 = createWindow(caps); // local final EDTUtil edt = window1.getScreen().getDisplay().getEDTUtil(); final Animator anim = new Animator(window1); try { @@ -174,10 +169,10 @@ public class TestBug1211IRQ00NEWT extends UITestCase { GLWindow lastWindow = null; try { final boolean ok = true; - for(int i=0; ok && i*100