diff options
author | Sven Gothel <[email protected]> | 2011-11-23 07:44:42 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-11-23 07:44:42 +0100 |
commit | bafd9b99816f55c105230a59211caf13f0315910 (patch) | |
tree | c805b6385938e2014f504d8d0d025ac799b79c44 /src/test/com/jogamp | |
parent | 645a863ee5a8efa915dd43abd608248e8cbc13cd (diff) |
NativeSurface's getGraphicsConfiguration() returns the native (delegated) AbstractGraphicsConfiguration, if delegation is used.
This change restricts the usage of AbstractGraphicsConfiguration's getNativeGraphicsConfiguration()
to NativeSurface implementations and hence reduces complexity.
NativeSurface implementations are adapted and access to it's AbstractGraphicsConfiguration
is controlled via get/set method avoiding flawed usage (read/write), since read access shall
return the delegated AbstractGraphicsConfiguration, if used.
Diffstat (limited to 'src/test/com/jogamp')
5 files changed, 6 insertions, 6 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/caps/MultisampleDemo01.java b/src/test/com/jogamp/opengl/test/junit/jogl/caps/MultisampleDemo01.java index b41501a9b..ab0171cb8 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/caps/MultisampleDemo01.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/caps/MultisampleDemo01.java @@ -63,7 +63,7 @@ class MultisampleDemo01 implements GLEventListener { } public void init(GLAutoDrawable drawable) { - AbstractGraphicsConfiguration config = drawable.getNativeSurface().getGraphicsConfiguration().getNativeGraphicsConfiguration(); + AbstractGraphicsConfiguration config = drawable.getNativeSurface().getGraphicsConfiguration(); System.err.println(); System.err.println("Info: " + config); System.err.println(); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/drawable/TestDrawable01NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/drawable/TestDrawable01NEWT.java index 5568b42f7..ec4af6772 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/drawable/TestDrawable01NEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/drawable/TestDrawable01NEWT.java @@ -99,7 +99,7 @@ public class TestDrawable01NEWT extends UITestCase { // Create native OpenGL resources .. XGL/WGL/CGL .. // equivalent to GLAutoDrawable methods: setVisible(true) // - GLCapabilities glCaps = (GLCapabilities) window.getGraphicsConfiguration().getNativeGraphicsConfiguration().getChosenCapabilities(); + GLCapabilities glCaps = (GLCapabilities) window.getGraphicsConfiguration().getChosenCapabilities(); Assert.assertNotNull(glCaps); Assert.assertTrue(glCaps.getGreenBits()>5); Assert.assertTrue(glCaps.getBlueBits()>5); diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestRemoteWindow01NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestRemoteWindow01NEWT.java index b0f892f27..eb652584c 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/TestRemoteWindow01NEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/TestRemoteWindow01NEWT.java @@ -77,7 +77,7 @@ public class TestRemoteWindow01NEWT extends UITestCase { // Create native OpenGL resources .. XGL/WGL/CGL .. // equivalent to GLAutoDrawable methods: setVisible(true) // - CapabilitiesImmutable chosenCapabilities = window.getGraphicsConfiguration().getNativeGraphicsConfiguration().getChosenCapabilities(); + CapabilitiesImmutable chosenCapabilities = window.getGraphicsConfiguration().getChosenCapabilities(); Assert.assertNotNull(chosenCapabilities); Assert.assertTrue(chosenCapabilities.getGreenBits()>5); Assert.assertTrue(chosenCapabilities.getBlueBits()>5); diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestWindows01NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestWindows01NEWT.java index 827dd09fb..a99edfadb 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/TestWindows01NEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/TestWindows01NEWT.java @@ -90,7 +90,7 @@ public class TestWindows01NEWT extends UITestCase { Assert.assertEquals(y, window.getY()); } */ - CapabilitiesImmutable chosenCapabilities = window.getGraphicsConfiguration().getNativeGraphicsConfiguration().getChosenCapabilities(); + CapabilitiesImmutable chosenCapabilities = window.getGraphicsConfiguration().getChosenCapabilities(); Assert.assertNotNull(chosenCapabilities); Assert.assertTrue(chosenCapabilities.getGreenBits()>=5); Assert.assertTrue(chosenCapabilities.getBlueBits()>=5); diff --git a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting02NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting02NEWT.java index 13aad0c25..e91dd481c 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting02NEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting02NEWT.java @@ -120,7 +120,7 @@ public class TestParenting02NEWT extends UITestCase { // glWindow1.addGLEventListener(demo1); glWindow1.setVisible(true); - CapabilitiesImmutable capsChosen = glWindow1.getGraphicsConfiguration().getNativeGraphicsConfiguration().getChosenCapabilities(); + CapabilitiesImmutable capsChosen = glWindow1.getGraphicsConfiguration().getChosenCapabilities(); Assert.assertNotNull(capsChosen); Assert.assertTrue(capsChosen.isOnscreen()==true); @@ -142,7 +142,7 @@ public class TestParenting02NEWT extends UITestCase { // glWindow2.addGLEventListener(demo2); glWindow2.setVisible(true); - capsChosen = glWindow2.getGraphicsConfiguration().getNativeGraphicsConfiguration().getChosenCapabilities(); + capsChosen = glWindow2.getGraphicsConfiguration().getChosenCapabilities(); Assert.assertNotNull(capsChosen); Assert.assertTrue(capsChosen.isOnscreen()==true); |