From ed7d5f2e3fc696d47b10c8d62a071643bf385588 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 5 Oct 2012 17:49:05 +0200 Subject: FBO/Offscreen: Use most simple GLCapabilities for GLFBODrawableImpl's underlying dummy surface/drawable If stencil or MSAA has been selected, the underlying dummy drawable doesn't need to have this configuration, i.e. doesn't need to waste the resources. - Creation of the dummy surface/drawable uses a simple GLCapabilities - Requested FBO GLCapabilities is being passes down to the dummy drawable - GLFBODrawableImpl ctor leaves caps untouched - GLFBODrawableImpl.initialize(boolean realize) - realize == true: using the requested FBO caps and setting it in the parent dummy drawable - realize == false: restore the original caps of dummy drawable --- .../junit/jogl/acore/TestGLAutoDrawableFactoryOffscrnCapsNEWT.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/test') diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableFactoryOffscrnCapsNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableFactoryOffscrnCapsNEWT.java index 1f5ac9b8a..51f9cc411 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableFactoryOffscrnCapsNEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableFactoryOffscrnCapsNEWT.java @@ -98,8 +98,9 @@ public class TestGLAutoDrawableFactoryOffscrnCapsNEWT extends UITestCase { // Check caps of GLDrawable after realization final GLCapabilitiesImmutable chosenGLCaps = glad.getChosenGLCapabilities(); - System.out.println("Chosen GL Caps(1): "+chosenGLCaps); System.out.println("Chosen GL CTX (1): "+glad.getContext().getGLVersion()); + System.out.println("Chosen GL Caps(1): "+chosenGLCaps); + System.out.println("Chosen GL Caps(2): "+glad.getNativeSurface().getGraphicsConfiguration().getChosenCapabilities()); Assert.assertNotNull(chosenGLCaps); Assert.assertTrue(chosenGLCaps.getGreenBits()>5); @@ -161,7 +162,7 @@ public class TestGLAutoDrawableFactoryOffscrnCapsNEWT extends UITestCase { if(null != f) { System.err.println(JoglVersion.getDefaultOpenGLInfo(f.getDefaultDevice(), null, true).toString()); } - } + } @Test public void testGL2OffScreenAutoDblBuf() throws InterruptedException { @@ -188,7 +189,7 @@ public class TestGLAutoDrawableFactoryOffscrnCapsNEWT extends UITestCase { reqGLCaps.setFBO(true); reqGLCaps.setDoubleBuffered(false); doTest(reqGLCaps, new GearsES2(1)); - } + } @Test public void testGL2OffScreenFBOStencil() throws InterruptedException { -- cgit v1.2.3