summaryrefslogtreecommitdiffstats
path: root/src/junit/com/jogamp/test
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-05-06 00:59:46 +0200
committerSven Gothel <[email protected]>2010-05-06 00:59:46 +0200
commitf3cd476a00e86da9963d4a5c705022e82d5d2059 (patch)
treef9dc721a8aa6b649a6aa5581893bb76dba15a069 /src/junit/com/jogamp/test
parentb8b7a30dcfbee99c60f9f0abeb95a973cc1dcdd5 (diff)
A little cleanup ..
Diffstat (limited to 'src/junit/com/jogamp/test')
-rwxr-xr-xsrc/junit/com/jogamp/test/junit/jogl/demos/gl2/gears/TestGearsNewtAWTWrapper.java2
-rwxr-xr-xsrc/junit/com/jogamp/test/junit/newt/TestParenting01AWT.java6
-rwxr-xr-xsrc/junit/com/jogamp/test/junit/newt/TestParenting01NEWT.java20
3 files changed, 6 insertions, 22 deletions
diff --git a/src/junit/com/jogamp/test/junit/jogl/demos/gl2/gears/TestGearsNewtAWTWrapper.java b/src/junit/com/jogamp/test/junit/jogl/demos/gl2/gears/TestGearsNewtAWTWrapper.java
index fb25ae399..51977d6d3 100755
--- a/src/junit/com/jogamp/test/junit/jogl/demos/gl2/gears/TestGearsNewtAWTWrapper.java
+++ b/src/junit/com/jogamp/test/junit/jogl/demos/gl2/gears/TestGearsNewtAWTWrapper.java
@@ -67,7 +67,7 @@ public class TestGearsNewtAWTWrapper {
protected void runTestGL(GLCapabilities caps) throws InterruptedException {
Display nDisplay = NewtFactory.createDisplay(NativeWindowFactory.TYPE_AWT, null); // local display
Screen nScreen = NewtFactory.createScreen(NativeWindowFactory.TYPE_AWT, nDisplay, 0); // screen 0
- Window nWindow = NewtFactory.createWindow(NativeWindowFactory.TYPE_AWT, nScreen, caps);
+ Window nWindow = NewtFactory.createWindow(NativeWindowFactory.TYPE_AWT, nScreen, caps, false);
GLWindow glWindow = GLWindow.create(nWindow);
Assert.assertNotNull(glWindow);
diff --git a/src/junit/com/jogamp/test/junit/newt/TestParenting01AWT.java b/src/junit/com/jogamp/test/junit/newt/TestParenting01AWT.java
index c46ec3941..9d0001733 100755
--- a/src/junit/com/jogamp/test/junit/newt/TestParenting01AWT.java
+++ b/src/junit/com/jogamp/test/junit/newt/TestParenting01AWT.java
@@ -131,7 +131,7 @@ public class TestParenting01AWT {
NEWTEventFiFo eventFifo = new NEWTEventFiFo();
- Window window2 = NewtFactory.createWindow(overlayedAWTComponent, screen, caps);
+ Window window2 = NewtFactory.createWindow(overlayedAWTComponent, screen, caps, false);
Assert.assertNotNull(window2);
GLWindow glWindow2 = GLWindow.create(window2);
@@ -145,14 +145,12 @@ public class TestParenting01AWT {
glWindow2.setTitle("NEWT - CHILD");
glWindow2.addKeyListener(new TraceKeyAdapter(new KeyAction(eventFifo)));
glWindow2.addWindowListener(new TraceWindowAdapter(new WindowAction(eventFifo)));
+ glWindow2.setVisible(true);
GLEventListener demo2 = new Gears();
setDemoFields(demo2, window2, glWindow2, false);
glWindow2.addGLEventListener(demo2);
- glWindow2.setVisible(true);
- glWindow2.display();
-
long duration = durationPerTest;
long step = 20;
NEWTEvent event;
diff --git a/src/junit/com/jogamp/test/junit/newt/TestParenting01NEWT.java b/src/junit/com/jogamp/test/junit/newt/TestParenting01NEWT.java
index cd85d1c9a..1940534dd 100755
--- a/src/junit/com/jogamp/test/junit/newt/TestParenting01NEWT.java
+++ b/src/junit/com/jogamp/test/junit/newt/TestParenting01NEWT.java
@@ -70,21 +70,14 @@ public class TestParenting01NEWT {
static Window createWindow(NativeWindow parent, Screen screen, Capabilities caps, int width, int height) {
Assert.assertNotNull(caps);
- //
- // Create native windowing resources .. X11/Win/OSX
- //
Window window;
- window = ( null == parent ) ? NewtFactory.createWindow(screen, caps) : NewtFactory.createWindow(parent, screen, caps) ;
+ window = ( null == parent ) ? NewtFactory.createWindow(screen, caps, false) : NewtFactory.createWindow(parent, screen, caps, false) ;
Assert.assertNotNull(window);
window.setSize(width, height);
Assert.assertTrue(false==window.isVisible());
Assert.assertTrue(width==window.getWidth());
Assert.assertTrue(height==window.getHeight());
- //
- // Create native OpenGL resources .. XGL/WGL/CGL ..
- // equivalent to GLAutoDrawable methods: setVisible(true)
- //
caps = window.getGraphicsConfiguration().getNativeGraphicsConfiguration().getChosenCapabilities();
Assert.assertNotNull(caps);
Assert.assertTrue(caps.getGreenBits()>5);
@@ -134,6 +127,7 @@ public class TestParenting01NEWT {
glWindow1.setPosition(x,y);
glWindow1.addKeyListener(new TraceKeyAdapter(new KeyAction(eventFifo)));
glWindow1.addWindowListener(new TraceWindowAdapter());
+ glWindow1.setVisible(true);
Window window2 = createWindow(window1, screen, caps, width/2, height/2);
Assert.assertNotNull(window2);
@@ -146,6 +140,7 @@ public class TestParenting01NEWT {
glWindow2.addKeyListener(new TraceKeyAdapter(new KeyAction(eventFifo)));
glWindow2.addWindowListener(new TraceWindowAdapter(new WindowAction(eventFifo)));
// glWindow2.addMouseListener(new TraceMouseAdapter());
+ glWindow2.setVisible(true);
GLEventListener demo1 = new RedSquare();
setDemoFields(demo1, window1, glWindow1, false);
@@ -155,15 +150,6 @@ public class TestParenting01NEWT {
setDemoFields(demo2, window2, glWindow2, false);
glWindow2.addGLEventListener(demo2);
- glWindow2.setVisible(true);
- glWindow1.setVisible(true);
-
- glWindow2.setVisible(true);
- glWindow1.setVisible(true);
-
- glWindow2.display();
- glWindow1.display();
-
boolean shouldQuit = false;
long duration = durationPerTest;
long step = 20;