diff options
Diffstat (limited to 'src/test/com/jogamp')
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/newt/TestRemoteGLWindows01NEWT.java | 45 |
1 files changed, 26 insertions, 19 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestRemoteGLWindows01NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestRemoteGLWindows01NEWT.java index 51034b59a..ee21a8ded 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/TestRemoteGLWindows01NEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/TestRemoteGLWindows01NEWT.java @@ -100,7 +100,8 @@ public class TestRemoteGLWindows01NEWT extends UITestCase { Assert.assertNotNull(glpLocal); GLCapabilities capsLocal = new GLCapabilities(glpLocal); Assert.assertNotNull(capsLocal); - GLWindow windowLocal = createWindow(null, capsLocal, new GearsES1(1)); // local with vsync + GearsES1 demoLocal = new GearsES1(1); + GLWindow windowLocal = createWindow(null, capsLocal, demoLocal); // local with vsync Assert.assertEquals(true,windowLocal.isNativeValid()); Assert.assertEquals(true,windowLocal.isVisible()); AbstractGraphicsDevice device1 = windowLocal.getScreen().getDisplay().getGraphicsDevice(); @@ -111,25 +112,27 @@ public class TestRemoteGLWindows01NEWT extends UITestCase { // Remote Display/Device/Screen/Window .. // Eager initialization of NEWT Display -> AbstractGraphicsDevice -> GLProfile (device) - Display display2; // remote display - AbstractGraphicsDevice device2; - Screen screen2; - GLWindow window2; + Display displayRemote; // remote display + AbstractGraphicsDevice deviceRemote; + Screen screenRemote; + GLWindow windowRemote; + GearsES1 demoRemote = null; try { - display2 = NewtFactory.createDisplay(remoteDisplay); // remote display - display2.createNative(); - System.err.println(display2); - device2 = display2.getGraphicsDevice(); - System.err.println(device2); - GLProfile.initProfiles(device2); // just to make sure + displayRemote = NewtFactory.createDisplay(remoteDisplay); // remote display + displayRemote.createNative(); + System.err.println(displayRemote); + deviceRemote = displayRemote.getGraphicsDevice(); + System.err.println(deviceRemote); + GLProfile.initProfiles(deviceRemote); // just to make sure System.err.println(); - System.err.println("GLProfiles window2: "+device2.getConnection()+": "+GLProfile.glAvailabilityToString(device2)); - GLProfile glpRemote = GLProfile.get(device2, GLProfile.GL2ES1); + System.err.println("GLProfiles window2: "+deviceRemote.getConnection()+": "+GLProfile.glAvailabilityToString(deviceRemote)); + GLProfile glpRemote = GLProfile.get(deviceRemote, GLProfile.GL2ES1); Assert.assertNotNull(glpRemote); GLCapabilities capsRemote = new GLCapabilities(glpRemote); Assert.assertNotNull(capsRemote); - screen2 = NewtFactory.createScreen(display2, 0); // screen 0 - window2 = createWindow(screen2, capsRemote, new GearsES1(0)); // remote, no vsync + screenRemote = NewtFactory.createScreen(displayRemote, 0); // screen 0 + demoRemote = new GearsES1(0); + windowRemote = createWindow(screenRemote, capsRemote, demoRemote); // remote, no vsync } catch (NativeWindowException nwe) { System.err.println(nwe); Assume.assumeNoException(nwe); @@ -137,19 +140,23 @@ public class TestRemoteGLWindows01NEWT extends UITestCase { return; } - Assert.assertEquals(true,window2.isNativeValid()); - Assert.assertEquals(true,window2.isVisible()); + Assert.assertEquals(true,windowRemote.isNativeValid()); + Assert.assertEquals(true,windowRemote.isVisible()); - animator.add(window2); + animator.add(windowRemote); animator.setUpdateFPSFrames(1, null); animator.start(); while(animator.getTotalFPSDuration()<durationPerTest) { Thread.sleep(100); } + if(null!=demoRemote) { + System.err.println("demoLocal VBO: "+demoLocal.getGear1().backFace.isVBO()); + System.err.println("demoRemote VBO: "+demoRemote.getGear1().backFace.isVBO()); + } destroyWindow(windowLocal); - destroyWindow(window2); + destroyWindow(windowRemote); } static int atoi(String a) { |