From 33896a42dcec55d52030fae33e64fa966c67f91d Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 16 Sep 2012 08:26:58 +0200 Subject: Disable double-buffer mode when offscreen-bitmap is chosen, remove dbl-buff bitmap test --- src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java | 6 +++++- .../jogl/acore/TestGLAutoDrawableDelegateOnOffscrnCapsNEWT.java | 9 --------- .../jogl/acore/TestGLAutoDrawableFactoryOffscrnCapsNEWT.java | 9 --------- .../jogl/acore/TestGLAutoDrawableGLWindowOnOffscrnCapsNEWT.java | 9 --------- 4 files changed, 5 insertions(+), 28 deletions(-) (limited to 'src') diff --git a/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java b/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java index 79f96b64a..13c95b0dd 100644 --- a/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java +++ b/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java @@ -179,7 +179,8 @@ public class GLGraphicsConfigurationUtil { if( capsRequested.isOnscreen() || useFBO != capsRequested.isFBO() || usePbuffer != capsRequested.isPBuffer() || - useBitmap != capsRequested.isBitmap() ) + useBitmap != capsRequested.isBitmap() || + useBitmap && capsRequested.getDoubleBuffered() ) { // fix caps .. final GLCapabilities caps2 = (GLCapabilities) capsRequested.cloneMutable(); @@ -187,6 +188,9 @@ public class GLGraphicsConfigurationUtil { caps2.setFBO( useFBO ); caps2.setPBuffer( usePbuffer ); caps2.setBitmap( useBitmap ); + if( useBitmap ) { + caps2.setDoubleBuffered(false); + } return caps2; } return capsRequested; diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableDelegateOnOffscrnCapsNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableDelegateOnOffscrnCapsNEWT.java index bcd777ef2..4628a5a58 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableDelegateOnOffscrnCapsNEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableDelegateOnOffscrnCapsNEWT.java @@ -285,15 +285,6 @@ public class TestGLAutoDrawableDelegateOnOffscrnCapsNEWT extends UITestCase { doTest(reqGLCaps, new GearsES2(1)); } - @Test - public void testGL2OffScreenBitmapDblBuf() throws InterruptedException { - final GLCapabilities reqGLCaps = getCaps(GLProfile.GL2); - if(null == reqGLCaps) return; - reqGLCaps.setOnscreen(false); - reqGLCaps.setBitmap(true); - doTest(reqGLCaps, new Gears(1)); - } - @Test public void testGL2OffScreenBitmapSglBuf() throws InterruptedException { final GLCapabilities reqGLCaps = getCaps(GLProfile.GL2); 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 544d74aa5..d318446d2 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 @@ -233,15 +233,6 @@ public class TestGLAutoDrawableFactoryOffscrnCapsNEWT extends UITestCase { doTest(reqGLCaps, new GearsES2(1)); } - @Test - public void testGL2OffScreenBitmapDblBuf() throws InterruptedException { - final GLCapabilities reqGLCaps = getCaps(GLProfile.GL2); - if(null == reqGLCaps) return; - reqGLCaps.setOnscreen(false); - reqGLCaps.setBitmap(true); - doTest(reqGLCaps, new Gears(1)); - } - @Test public void testGL2OffScreenBitmapSglBuf() throws InterruptedException { final GLCapabilities reqGLCaps = getCaps(GLProfile.GL2); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableGLWindowOnOffscrnCapsNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableGLWindowOnOffscrnCapsNEWT.java index 37ec44566..145078629 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableGLWindowOnOffscrnCapsNEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableGLWindowOnOffscrnCapsNEWT.java @@ -252,15 +252,6 @@ public class TestGLAutoDrawableGLWindowOnOffscrnCapsNEWT extends UITestCase { doTest(reqGLCaps, new GearsES2(1)); } - @Test - public void testGL2OffScreenBitmapDblBuf() throws InterruptedException { - final GLCapabilities reqGLCaps = getCaps(GLProfile.GL2); - if(null == reqGLCaps) return; - reqGLCaps.setOnscreen(false); - reqGLCaps.setBitmap(true); - doTest(reqGLCaps, new Gears(1)); - } - @Test public void testGL2OffScreenBitmapSglBuf() throws InterruptedException { final GLCapabilities reqGLCaps = getCaps(GLProfile.GL2); -- cgit v1.2.3