diff options
author | Sven Gothel <[email protected]> | 2010-11-17 21:53:16 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2010-11-17 21:53:16 +0100 |
commit | 29e3b223eae9f5775d1dd34f2aaeeb3db6d9233c (patch) | |
tree | eae2c7d60a4cdbcdacd4057b020044bd42fb30b8 /src/junit/com/jogamp/test | |
parent | 64aa219406c1aa1d6022fedce7a52c8c19d0e35d (diff) |
Finishing Immutable changes including GLCapabiltiesImmutable.
Diffstat (limited to 'src/junit/com/jogamp/test')
5 files changed, 17 insertions, 17 deletions
diff --git a/src/junit/com/jogamp/test/junit/jogl/demos/gl2/gears/newt/TestGearsNewtAWTWrapper.java b/src/junit/com/jogamp/test/junit/jogl/demos/gl2/gears/newt/TestGearsNewtAWTWrapper.java index ef4b657fc..d0b8cc7de 100644 --- a/src/junit/com/jogamp/test/junit/jogl/demos/gl2/gears/newt/TestGearsNewtAWTWrapper.java +++ b/src/junit/com/jogamp/test/junit/jogl/demos/gl2/gears/newt/TestGearsNewtAWTWrapper.java @@ -63,7 +63,7 @@ public class TestGearsNewtAWTWrapper extends UITestCase { public static void releaseClass() { } - protected void runTestGL(GLCapabilities caps) throws InterruptedException { + protected void runTestGL(GLCapabilitiesImmutable caps) throws InterruptedException { Display nDisplay = NewtFactory.createDisplay(NativeWindowFactory.TYPE_AWT, null, false); // local display Screen nScreen = NewtFactory.createScreen(nDisplay, 0); // screen 0 Window nWindow = NewtFactory.createWindow(nScreen, caps); @@ -94,7 +94,7 @@ public class TestGearsNewtAWTWrapper extends UITestCase { @Test public void test01() throws InterruptedException { - GLCapabilities caps = new GLCapabilities(GLProfile.getDefault()); + GLCapabilitiesImmutable caps = new GLCapabilities(GLProfile.getDefault()); runTestGL(caps); } diff --git a/src/junit/com/jogamp/test/junit/jogl/offscreen/WindowUtilNEWT.java b/src/junit/com/jogamp/test/junit/jogl/offscreen/WindowUtilNEWT.java index 6deacf726..cfe956c61 100644 --- a/src/junit/com/jogamp/test/junit/jogl/offscreen/WindowUtilNEWT.java +++ b/src/junit/com/jogamp/test/junit/jogl/offscreen/WindowUtilNEWT.java @@ -41,7 +41,7 @@ import com.jogamp.newt.opengl.*; public class WindowUtilNEWT { public static GLCapabilities fixCaps(GLCapabilities caps, boolean onscreen, boolean pbuffer, boolean undecorated) { - GLCapabilities caps2 = (GLCapabilities) caps.clone(); + GLCapabilities caps2 = (GLCapabilities) caps.cloneMutable(); caps2.setOnscreen(onscreen); caps2.setPBuffer(!onscreen && pbuffer); caps2.setDoubleBuffered(!onscreen); diff --git a/src/junit/com/jogamp/test/junit/newt/TestGLWindows00NEWT.java b/src/junit/com/jogamp/test/junit/newt/TestGLWindows00NEWT.java index d28dd2c11..2769dc550 100644 --- a/src/junit/com/jogamp/test/junit/newt/TestGLWindows00NEWT.java +++ b/src/junit/com/jogamp/test/junit/newt/TestGLWindows00NEWT.java @@ -58,7 +58,7 @@ public class TestGLWindows00NEWT extends UITestCase { glp = GLProfile.getDefault(); } - static GLWindow createWindow(Screen screen, GLCapabilities caps) + static GLWindow createWindow(Screen screen, GLCapabilitiesImmutable caps) throws InterruptedException { Assert.assertNotNull(caps); diff --git a/src/junit/com/jogamp/test/junit/newt/TestGLWindows01NEWT.java b/src/junit/com/jogamp/test/junit/newt/TestGLWindows01NEWT.java index 934d75f7c..e2c65adb8 100644 --- a/src/junit/com/jogamp/test/junit/newt/TestGLWindows01NEWT.java +++ b/src/junit/com/jogamp/test/junit/newt/TestGLWindows01NEWT.java @@ -57,7 +57,7 @@ public class TestGLWindows01NEWT extends UITestCase { glp = GLProfile.getDefault(); } - static GLWindow createWindow(Screen screen, GLCapabilities caps, + static GLWindow createWindow(Screen screen, GLCapabilities caps, int width, int height, boolean onscreen, boolean undecorated, boolean addGLEventListenerAfterVisible) throws InterruptedException @@ -102,12 +102,12 @@ public class TestGLWindows01NEWT extends UITestCase { // Create native OpenGL resources .. XGL/WGL/CGL .. // equivalent to GLAutoDrawable methods: setVisible(true) // - caps = glWindow.getChosenGLCapabilities(); - Assert.assertNotNull(caps); - Assert.assertTrue(caps.getGreenBits()>5); - Assert.assertTrue(caps.getBlueBits()>5); - Assert.assertTrue(caps.getRedBits()>5); - Assert.assertEquals(caps.isOnscreen(),onscreen); + GLCapabilitiesImmutable caps2 = glWindow.getChosenGLCapabilities(); + Assert.assertNotNull(caps2); + Assert.assertTrue(caps2.getGreenBits()>=5); + Assert.assertTrue(caps2.getBlueBits()>=5); + Assert.assertTrue(caps2.getRedBits()>=5); + Assert.assertEquals(caps2.isOnscreen(),onscreen); if(addGLEventListenerAfterVisible) { glWindow.addGLEventListener(demo); diff --git a/src/junit/com/jogamp/test/junit/newt/TestGLWindows02NEWTAnimated.java b/src/junit/com/jogamp/test/junit/newt/TestGLWindows02NEWTAnimated.java index 78b9773a8..e79d57a4f 100644 --- a/src/junit/com/jogamp/test/junit/newt/TestGLWindows02NEWTAnimated.java +++ b/src/junit/com/jogamp/test/junit/newt/TestGLWindows02NEWTAnimated.java @@ -104,12 +104,12 @@ public class TestGLWindows02NEWTAnimated extends UITestCase { // Create native OpenGL resources .. XGL/WGL/CGL .. // equivalent to GLAutoDrawable methods: setVisible(true) // - caps = glWindow.getChosenGLCapabilities(); - Assert.assertNotNull(caps); - Assert.assertTrue(caps.getGreenBits()>5); - Assert.assertTrue(caps.getBlueBits()>5); - Assert.assertTrue(caps.getRedBits()>5); - Assert.assertEquals(caps.isOnscreen(),onscreen); + GLCapabilitiesImmutable caps2 = glWindow.getChosenGLCapabilities(); + Assert.assertNotNull(caps2); + Assert.assertTrue(caps2.getGreenBits()>=5); + Assert.assertTrue(caps2.getBlueBits()>=5); + Assert.assertTrue(caps2.getRedBits()>=5); + Assert.assertEquals(caps2.isOnscreen(),onscreen); return glWindow; } |