diff options
author | Sven Gothel <[email protected]> | 2015-09-03 18:21:36 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2015-09-03 18:21:36 +0200 |
commit | 3e5c410e1d0ae42c68a7ab1342a7da96ef523a4b (patch) | |
tree | 64e45717bc0a1b80032e13dac2a356df27a6eec0 /src/test | |
parent | 34d54a9af4413eab840ef9055400e2f5845b4f3a (diff) |
Bug 1211 TestBug1211IRQ00NEWT: Fix using durationTest01; Make createWindow(..) analog to GLWindow.main(..)
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/newt/TestBug1211IRQ00NEWT.java | 21 |
1 files changed, 8 insertions, 13 deletions
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<durationTest00; i++) { + for(int i=0; ok && i*100<durationTest01; i++) { final GLCapabilities caps = new GLCapabilities(glp); Assert.assertNotNull(caps); - final GLWindow window1 = createWindow(null, caps); // local + final GLWindow window1 = createWindow(caps); // local lastWindow = window1; window1.setVisible(true); Assert.assertEquals(true,window1.isVisible()); |