diff options
author | Sven Gothel <[email protected]> | 2013-07-17 00:59:45 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-07-17 00:59:45 +0200 |
commit | 78abc89be7f3935f26802cc0db33f61fc2c65de0 (patch) | |
tree | 72d34f224479ba5d63b8acecfbbbee799486c195 | |
parent | 55e480cd487e3089fae9b836eb213cd7c6b3d79a (diff) |
Fix OSX GL-core lack of pbuffer: GLDrawableFactory.canCreateGLPbuffer(..) add GLProfile argument, similar to canCreateFBO(..)
In case a compatible non-core profile is requests, canCreateGLPbuffer(..) returns false on OSX.
16 files changed, 79 insertions, 70 deletions
diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh index bb8d2463f..5489b7944 100644 --- a/make/scripts/tests.sh +++ b/make/scripts/tests.sh @@ -89,6 +89,7 @@ function jrun() { #D_ARGS="-Djogl.debug.FBObject" #D_ARGS="-Djogl.debug.GLSLCode" D_ARGS="-Djogl.debug.GLSLCode -Djogl.debug.DebugGL" + #D_ARGS="-Djogl.debug=all -Dnewt.debug=all" #D_ARGS="-Djogl.debug.GLContext -Dnativewindow.debug.JAWT -Dnewt.debug.Window" #D_ARGS="-Dnativewindow.debug.JAWT -Djogamp.debug.TaskBase.TraceSource" #D_ARGS="-Djogl.debug.GLContext.TraceSwitch" @@ -312,7 +313,7 @@ function testawtswt() { # av demos # #testnoawt jogamp.opengl.openal.av.ALDummyUsage $* -testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.av.MovieCube $* +#testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.av.MovieCube $* #testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.av.MovieSimple $* # @@ -615,5 +616,15 @@ testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.av.MovieCube $* # NEW +#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestGLProfile01NEWT $* + +#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestFBOMRTNEWT01 $* +#testnoawt com.jogamp.opengl.test.junit.graph.TestRegionRendererNEWT01 $* + +#testnoawt com.jogamp.opengl.test.junit.jogl.offscreen.TestOffscreen01GLPBufferNEWT $* +#testawt com.jogamp.opengl.test.junit.jogl.acore.TestAddRemove01GLCanvasSwingAWT $* +#testnoawt com.jogamp.opengl.test.junit.jogl.caps.TestMultisampleES1NEWT $* +testnoawt com.jogamp.opengl.test.junit.jogl.caps.TestMultisampleES2NEWT $* + $spath/count-edt-start.sh java-run.log diff --git a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java index f1d8ff95e..580d3a50b 100644 --- a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java +++ b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java @@ -443,7 +443,7 @@ public abstract class GLDrawableFactory { * </p> * <p> * A Pbuffer drawable is created if both {@link GLCapabilitiesImmutable#isPBuffer() caps.isPBuffer()} - * and {@link #canCreateGLPbuffer(AbstractGraphicsDevice) canCreateGLPbuffer(device)} is true. + * and {@link #canCreateGLPbuffer(AbstractGraphicsDevice, GLProfile) canCreateGLPbuffer(device)} is true. * </p> * <p> * If not onscreen and neither FBO nor Pbuffer is available, @@ -454,7 +454,7 @@ public abstract class GLDrawableFactory { * @throws GLException if any window system-specific errors caused * the creation of the GLDrawable to fail. * - * @see #canCreateGLPbuffer(AbstractGraphicsDevice) + * @see #canCreateGLPbuffer(AbstractGraphicsDevice, GLProfile) * @see GLContext#isFBOAvailable(AbstractGraphicsDevice, GLProfile) * @see javax.media.opengl.GLCapabilities#isOnscreen() * @see javax.media.opengl.GLCapabilities#isFBO() @@ -482,7 +482,7 @@ public abstract class GLDrawableFactory { * </p> * <p> * A Pbuffer based auto drawable is created if both {@link GLCapabilitiesImmutable#isPBuffer() caps.isPBuffer()} - * and {@link #canCreateGLPbuffer(AbstractGraphicsDevice) canCreateGLPbuffer(device)} is true. + * and {@link #canCreateGLPbuffer(AbstractGraphicsDevice, GLProfile) canCreateGLPbuffer(device)} is true. * </p> * <p> * If neither FBO nor Pbuffer is available, @@ -520,7 +520,7 @@ public abstract class GLDrawableFactory { * </p> * <p> * A Pbuffer drawable is created if both {@link GLCapabilitiesImmutable#isPBuffer() caps.isPBuffer()} - * and {@link #canCreateGLPbuffer(AbstractGraphicsDevice) canCreateGLPbuffer(device)} is true. + * and {@link #canCreateGLPbuffer(AbstractGraphicsDevice, GLProfile) canCreateGLPbuffer(device)} is true. * </p> * <p> * If neither FBO nor Pbuffer is available, @@ -590,12 +590,16 @@ public abstract class GLDrawableFactory { public abstract boolean canCreateFBO(AbstractGraphicsDevice device, GLProfile glp); /** - * Returns true if it is possible to create a GLPbuffer. Some older - * graphics cards do not have this capability. + * Returns true if it is possible to create an <i>pbuffer surface</i>. + * <p> + * Some older graphics cards do not have this capability, + * as well as some new GL implementation, i.e. OpenGL 3 core on OSX. + * </p> * * @param device which {@link javax.media.nativewindow.AbstractGraphicsDevice#getConnection() connection} denotes the shared the target device, may be <code>null</code> for the platform's default device. + * @param glp {@link GLProfile} to check for FBO capabilities */ - public abstract boolean canCreateGLPbuffer(AbstractGraphicsDevice device); + public abstract boolean canCreateGLPbuffer(AbstractGraphicsDevice device, GLProfile glp); /** * Creates a GLPbuffer {@link GLAutoDrawable} with the given capabilites and dimensions. diff --git a/src/jogl/classes/jogamp/opengl/GLContextImpl.java b/src/jogl/classes/jogamp/opengl/GLContextImpl.java index 6f4f6f271..996a47590 100644 --- a/src/jogl/classes/jogamp/opengl/GLContextImpl.java +++ b/src/jogl/classes/jogamp/opengl/GLContextImpl.java @@ -1851,7 +1851,7 @@ public abstract class GLContextImpl extends GLContext { } @Override - public boolean isExtensionAvailable(String glExtensionName) { + public final boolean isExtensionAvailable(String glExtensionName) { if(null!=extensionAvailability) { return extensionAvailability.isExtensionAvailable(mapToRealGLExtensionName(glExtensionName)); } diff --git a/src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java b/src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java index 4ac413545..41ea06deb 100644 --- a/src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java +++ b/src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java @@ -247,7 +247,7 @@ public abstract class GLDrawableFactoryImpl extends GLDrawableFactory { // @Override - public abstract boolean canCreateGLPbuffer(AbstractGraphicsDevice device); + public abstract boolean canCreateGLPbuffer(AbstractGraphicsDevice device, GLProfile glp); @Override public GLPbuffer createGLPbuffer(AbstractGraphicsDevice deviceReq, @@ -263,7 +263,7 @@ public abstract class GLDrawableFactoryImpl extends GLDrawableFactory { if(null == device) { throw new GLException("No shared device for requested: "+deviceReq); } - if ( !canCreateGLPbuffer(device) ) { + if ( !canCreateGLPbuffer(device, capsRequested.getGLProfile()) ) { throw new GLException("Pbuffer not available with device: "+device); } diff --git a/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java b/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java index 48b509263..d54da4d28 100644 --- a/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java +++ b/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java @@ -200,8 +200,9 @@ public class GLGraphicsConfigurationUtil { if(null == device) { device = factory.getDefaultDevice(); } - final boolean fboAvailable = GLContext.isFBOAvailable(device, capsRequested.getGLProfile()); - final boolean pbufferAvailable = factory.canCreateGLPbuffer(device); + final GLProfile glp = capsRequested.getGLProfile(); + final boolean fboAvailable = GLContext.isFBOAvailable(device, glp); + final boolean pbufferAvailable = factory.canCreateGLPbuffer(device, glp); final GLRendererQuirks glrq = factory.getRendererQuirks(device); final boolean bitmapAvailable; diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java b/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java index 465c8fa80..9c1cc7fc4 100644 --- a/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java +++ b/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java @@ -703,7 +703,7 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl { } @Override - public boolean canCreateGLPbuffer(AbstractGraphicsDevice device) { + public boolean canCreateGLPbuffer(AbstractGraphicsDevice device, GLProfile glp) { // SharedResource sr = getOrCreateEGLSharedResource(device); // return sr.hasES1PBuffer() || sr.hasES2PBuffer(); return true; diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java index 9b163ae5b..6787ef500 100644 --- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java +++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java @@ -74,7 +74,6 @@ import com.jogamp.common.util.VersionNumber; import com.jogamp.common.util.locks.RecursiveLock; import com.jogamp.gluegen.runtime.ProcAddressTable; import com.jogamp.gluegen.runtime.opengl.GLProcAddressResolver; -import com.jogamp.opengl.GLExtensions; import com.jogamp.opengl.GLRendererQuirks; import com.jogamp.opengl.util.PMVMatrix; import com.jogamp.opengl.util.glsl.ShaderCode; @@ -465,15 +464,6 @@ public class MacOSXCGLContext extends GLContextImpl return new StringBuilder(); } - @Override - public boolean isExtensionAvailable(String glExtensionName) { - if (glExtensionName.equals(GLExtensions.ARB_pbuffer) || - glExtensionName.equals(GLExtensions.ARB_pixel_format)) { - return true; - } - return super.isExtensionAvailable(glExtensionName); - } - // Support for "mode switching" as described in MacOSXCGLDrawable public void setOpenGLMode(GLBackendType mode) { if (mode == openGLMode) { diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java index c9402b33d..83d656475 100644 --- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java +++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java @@ -332,8 +332,13 @@ public class MacOSXCGLDrawableFactory extends GLDrawableFactoryImpl { } @Override - public boolean canCreateGLPbuffer(AbstractGraphicsDevice device) { - return true; + public boolean canCreateGLPbuffer(AbstractGraphicsDevice device, GLProfile glp) { + if( glp.isGL2() ) { + // OSX only supports pbuffer w/ compatible, non-core, context. + return true; + } else { + return false; + } } @Override diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java index 45edda516..338a351cb 100644 --- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java +++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java @@ -470,7 +470,7 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl { } @Override - public final boolean canCreateGLPbuffer(AbstractGraphicsDevice device) { + public final boolean canCreateGLPbuffer(AbstractGraphicsDevice device, GLProfile glp) { SharedResource sr = getOrCreateSharedResourceImpl( ( null != device ) ? device : defaultDevice ); if(null!=sr) { return sr.hasARBPBuffer(); diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java index b3b02e23f..52069b88f 100644 --- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java +++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java @@ -490,7 +490,7 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl { } @Override - public final boolean canCreateGLPbuffer(AbstractGraphicsDevice device) { + public final boolean canCreateGLPbuffer(AbstractGraphicsDevice device, GLProfile glp) { if(null == device) { SharedResourceRunner.Resource sr = sharedResourceRunner.getOrCreateShared(defaultDevice); if(null!=sr) { @@ -551,7 +551,7 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl { @Override public final boolean canCreateExternalGLDrawable(AbstractGraphicsDevice device) { - return canCreateGLPbuffer(device); + return canCreateGLPbuffer(device, null /* GLProfile not used for query on X11 */); } @Override diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestAddRemove01GLCanvasSwingAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestAddRemove01GLCanvasSwingAWT.java index c2eebbfd8..d96a49bb8 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestAddRemove01GLCanvasSwingAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestAddRemove01GLCanvasSwingAWT.java @@ -63,20 +63,22 @@ public class TestAddRemove01GLCanvasSwingAWT extends UITestCase { static boolean noOffscreenTest = false; static boolean offscreenPBufferOnly = false; static boolean offscreenFBOOnly = false; - static GLProfile glp; + static GLProfile glpGL2, glpGL2ES2; static int width, height; static boolean waitForKey = false; static boolean waitForKeyPost = false; @BeforeClass public static void initClass() { + width = 640; + height = 480; if(GLProfile.isAvailable(GLProfile.GL2ES2)) { - glp = GLProfile.get(GLProfile.GL2ES2); - Assert.assertNotNull(glp); - width = 640; - height = 480; - } else { - setTestSupported(false); + glpGL2ES2 = GLProfile.get(GLProfile.GL2ES2); + Assert.assertNotNull(glpGL2ES2); + } + if(GLProfile.isAvailable(GLProfile.GL2)) { + glpGL2 = GLProfile.get(GLProfile.GL2); + Assert.assertNotNull(glpGL2); } } @@ -198,7 +200,7 @@ public class TestAddRemove01GLCanvasSwingAWT extends UITestCase { System.err.println("No onscreen test requested or platform doesn't support onscreen rendering."); return; } - GLCapabilities caps = new GLCapabilities(glp); + GLCapabilities caps = new GLCapabilities(glpGL2ES2); runTestGL(true, caps, addRemoveCount); } @@ -214,7 +216,7 @@ public class TestAddRemove01GLCanvasSwingAWT extends UITestCase { System.err.println("Only PBuffer test is requested."); return; } - GLCapabilities caps = new GLCapabilities(glp); + GLCapabilities caps = new GLCapabilities(glpGL2ES2); if(offscreenPBufferOnly) { caps.setPBuffer(true); caps.setOnscreen(true); // simulate normal behavior .. @@ -234,7 +236,7 @@ public class TestAddRemove01GLCanvasSwingAWT extends UITestCase { System.err.println("Only FBO test is requested."); return; } - GLCapabilities caps = new GLCapabilities(glp); + GLCapabilities caps = new GLCapabilities(glpGL2); caps.setPBuffer(true); caps.setOnscreen(true); // simulate normal behavior .. runTestGL(false, caps, addRemoveCount); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug461FBOSupersamplingSwingAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug461FBOSupersamplingSwingAWT.java index 22c1f62dd..56e308427 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug461FBOSupersamplingSwingAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug461FBOSupersamplingSwingAWT.java @@ -142,7 +142,7 @@ public class TestBug461FBOSupersamplingSwingAWT extends UITestCase implements GL GLDrawableFactory fac = GLDrawableFactory.getFactory(glp); Assert.assertNotNull(fac); - Assert.assertTrue( fac.canCreateGLPbuffer(GLProfile.getDefaultDevice()) ); + Assert.assertTrue( fac.canCreateGLPbuffer(GLProfile.getDefaultDevice(), glp) ); GLCapabilities glCap = new GLCapabilities(glp); Assert.assertNotNull(glCap); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug461PBufferSupersamplingSwingAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug461PBufferSupersamplingSwingAWT.java index 5b7052c37..bda1a29fd 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug461PBufferSupersamplingSwingAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug461PBufferSupersamplingSwingAWT.java @@ -126,7 +126,7 @@ public class TestBug461PBufferSupersamplingSwingAWT extends UITestCase implement GLDrawableFactory fac = GLDrawableFactory.getFactory(glp); Assert.assertNotNull(fac); - Assert.assertTrue( fac.canCreateGLPbuffer(GLProfile.getDefaultDevice()) ); + Assert.assertTrue( fac.canCreateGLPbuffer(GLProfile.getDefaultDevice(), glp) ); GLCapabilities glCap = new GLCapabilities(glp); Assert.assertNotNull(glCap); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/caps/TestMultisampleES1NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/caps/TestMultisampleES1NEWT.java index 5bbd6737c..bc4ee5502 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/caps/TestMultisampleES1NEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/caps/TestMultisampleES1NEWT.java @@ -72,54 +72,54 @@ public class TestMultisampleES1NEWT extends UITestCase { @Test public void testOnscreenMultiSampleAA0() throws InterruptedException { - testMultiSampleAAImpl(true, 0); + testMultiSampleAAImpl(false, false, 0); } @Test public void testOnscreenMultiSampleAA2() throws InterruptedException { - testMultiSampleAAImpl(true, 2); + testMultiSampleAAImpl(false, false, 2); } @Test public void testOnscreenMultiSampleAA4() throws InterruptedException { - testMultiSampleAAImpl(true, 4); + testMultiSampleAAImpl(false, false, 4); } @Test public void testOnscreenMultiSampleAA8() throws InterruptedException { - testMultiSampleAAImpl(true, 8); + testMultiSampleAAImpl(false, false, 8); } @Test - public void testOffscreenMultiSampleAA0() throws InterruptedException { - testMultiSampleAAImpl(false, 0); + public void testOffscreenPBufferMultiSampleAA0() throws InterruptedException { + testMultiSampleAAImpl(false, true, 0); } @Test - public void testOffscreenMultiSampleAA2() throws InterruptedException { - testMultiSampleAAImpl(false, 2); + public void testOffsreenPBufferMultiSampleAA8() throws InterruptedException { + testMultiSampleAAImpl(false, true, 8); } @Test - public void testOffscreenMultiSampleAA4() throws InterruptedException { - testMultiSampleAAImpl(false, 4); + public void testOffscreenFBOMultiSampleAA0() throws InterruptedException { + testMultiSampleAAImpl(true, false, 0); } @Test - public void testOffsreenMultiSampleAA8() throws InterruptedException { - testMultiSampleAAImpl(false, 8); + public void testOffsreenFBOMultiSampleAA8() throws InterruptedException { + testMultiSampleAAImpl(true, false, 8); } - private void testMultiSampleAAImpl(boolean onscreen, int reqSamples) throws InterruptedException { + private void testMultiSampleAAImpl(boolean useFBO, boolean usePBuffer, int reqSamples) throws InterruptedException { final GLReadBufferUtil screenshot = new GLReadBufferUtil(true, false); GLProfile glp = GLProfile.getMaxFixedFunc(true); GLCapabilities caps = new GLCapabilities(glp); GLCapabilitiesChooser chooser = new MultisampleChooser01(); - if(!onscreen) { - caps.setOnscreen(onscreen); - caps.setPBuffer(true); - } + caps.setAlphaBits(1); + caps.setFBO(useFBO); + caps.setPBuffer(usePBuffer); + if(reqSamples>0) { caps.setSampleBuffers(true); caps.setNumSamples(reqSamples); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/caps/TestMultisampleES2NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/caps/TestMultisampleES2NEWT.java index c2e3215ae..f3d320dff 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/caps/TestMultisampleES2NEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/caps/TestMultisampleES2NEWT.java @@ -100,10 +100,6 @@ public class TestMultisampleES2NEWT extends UITestCase { } private void testMultiSampleAAImpl(boolean useFBO, boolean usePBuffer, int reqSamples) throws InterruptedException { - if(useFBO) { - System.err.println("NEWT offscreen FBO Window n/a yet"); - return; - } final GLReadBufferUtil screenshot = new GLReadBufferUtil(true, false); GLProfile glp = GLProfile.getGL2ES2(); GLCapabilities caps = new GLCapabilities(glp); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/TestOffscreen01GLPBufferNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/TestOffscreen01GLPBufferNEWT.java index 2ed471436..f1408d38f 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/TestOffscreen01GLPBufferNEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/TestOffscreen01GLPBufferNEWT.java @@ -56,7 +56,7 @@ public class TestOffscreen01GLPBufferNEWT extends UITestCase { glpDefault = GLProfile.getDefault(); Assert.assertNotNull(glpDefault); glDrawableFactory = GLDrawableFactory.getFactory(glpDefault); - System.out.println("INFO: PBuffer supported: "+ glDrawableFactory.canCreateGLPbuffer(null)); + System.out.println("INFO: PBuffer supported: "+ glDrawableFactory.canCreateGLPbuffer(null, glpDefault)); width = 640; height = 480; } @@ -108,7 +108,7 @@ public class TestOffscreen01GLPBufferNEWT extends UITestCase { @Test public void test01aOffscreenWindowPBuffer() { - if(!glDrawableFactory.canCreateGLPbuffer(null)) { + if(!glDrawableFactory.canCreateGLPbuffer(null, capsDefault.getGLProfile())) { System.out.println("WARNING: PBuffer not supported on this platform - cannot test"); return; } @@ -118,7 +118,7 @@ public class TestOffscreen01GLPBufferNEWT extends UITestCase { @Test public void test01bOffscreenWindowPBufferStencil() { - if(!glDrawableFactory.canCreateGLPbuffer(null)) { + if(!glDrawableFactory.canCreateGLPbuffer(null, capsDefault.getGLProfile())) { System.out.println("WARNING: PBuffer not supported on this platform - cannot test"); return; } @@ -129,7 +129,7 @@ public class TestOffscreen01GLPBufferNEWT extends UITestCase { @Test public void test01cOffscreenWindowPBufferStencilAlpha() { - if(!glDrawableFactory.canCreateGLPbuffer(null)) { + if(!glDrawableFactory.canCreateGLPbuffer(null, capsDefault.getGLProfile())) { System.out.println("WARNING: PBuffer not supported on this platform - cannot test"); return; } @@ -141,7 +141,7 @@ public class TestOffscreen01GLPBufferNEWT extends UITestCase { @Test public void test01cOffscreenWindowPBuffer555() { - if(!glDrawableFactory.canCreateGLPbuffer(null)) { + if(!glDrawableFactory.canCreateGLPbuffer(null, capsDefault.getGLProfile())) { System.out.println("WARNING: PBuffer not supported on this platform - cannot test"); return; } @@ -154,7 +154,7 @@ public class TestOffscreen01GLPBufferNEWT extends UITestCase { @Test public void test02Offscreen3Windows1DisplayPBuffer() { - if(!glDrawableFactory.canCreateGLPbuffer(null)) { + if(!glDrawableFactory.canCreateGLPbuffer(null, capsDefault.getGLProfile())) { System.out.println("WARNING: PBuffer not supported on this platform - cannot test"); return; } @@ -207,7 +207,7 @@ public class TestOffscreen01GLPBufferNEWT extends UITestCase { @Test public void test03Offscreen3Windows3DisplaysPBuffer() { - if(!glDrawableFactory.canCreateGLPbuffer(null)) { + if(!glDrawableFactory.canCreateGLPbuffer(null, capsDefault.getGLProfile())) { System.out.println("WARNING: PBuffer not supported on this platform - cannot test"); return; } @@ -260,7 +260,7 @@ public class TestOffscreen01GLPBufferNEWT extends UITestCase { @Test public void test04OffscreenSnapshotWithDemoPBuffer() { - if(!glDrawableFactory.canCreateGLPbuffer(null)) { + if(!glDrawableFactory.canCreateGLPbuffer(null, capsDefault.getGLProfile())) { System.out.println("WARNING: PBuffer not supported on this platform - cannot test"); return; } |