diff options
author | Sven Gothel <[email protected]> | 2010-04-27 18:00:20 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2010-04-27 18:00:20 +0200 |
commit | b5fc2499749d9c180d3e5a0e04a939bd78017068 (patch) | |
tree | d47913fe1c907b929ec0359c0dc87a541142cf9f /src/junit/com/jogamp/test | |
parent | 2e99ad22783143067887881665a6204ac0e47d91 (diff) |
Relax Junit: TestOffscreen01NEWT, ie no failure if no PBuffer available
Diffstat (limited to 'src/junit/com/jogamp/test')
-rwxr-xr-x | src/junit/com/jogamp/test/junit/jogl/offscreen/TestOffscreen01NEWT.java | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/junit/com/jogamp/test/junit/jogl/offscreen/TestOffscreen01NEWT.java b/src/junit/com/jogamp/test/junit/jogl/offscreen/TestOffscreen01NEWT.java index 67d1d5138..54ee06a84 100755 --- a/src/junit/com/jogamp/test/junit/jogl/offscreen/TestOffscreen01NEWT.java +++ b/src/junit/com/jogamp/test/junit/jogl/offscreen/TestOffscreen01NEWT.java @@ -57,6 +57,7 @@ import java.io.IOException; public class TestOffscreen01NEWT { static GLProfile glpDefault; + static GLDrawableFactory glDrawableFactory; static int width, height; GLCapabilities capsDefault; @@ -64,6 +65,7 @@ public class TestOffscreen01NEWT { public static void initClass() { glpDefault = GLProfile.getDefault(); Assert.assertNotNull(glpDefault); + glDrawableFactory = GLDrawableFactory.getFactory(glpDefault); width = 640; height = 480; } @@ -112,12 +114,20 @@ public class TestOffscreen01NEWT { @Test public void test01aOffscreenWindowPBuffer() { + if(!glDrawableFactory.canCreateGLPbuffer(null)) { + System.out.println("WARNING: PBuffer not supported on this platform - cannot test"); + return; + } GLCapabilities caps2 = WindowUtilNEWT.fixCaps(capsDefault, false, true, false); do01OffscreenWindowPBuffer(caps2); } @Test public void test01bOffscreenWindowPBufferStencil() { + if(!glDrawableFactory.canCreateGLPbuffer(null)) { + System.out.println("WARNING: PBuffer not supported on this platform - cannot test"); + return; + } GLCapabilities caps2 = WindowUtilNEWT.fixCaps(capsDefault, false, true, false); caps2.setStencilBits(8); do01OffscreenWindowPBuffer(caps2); @@ -125,6 +135,10 @@ public class TestOffscreen01NEWT { @Test public void test01cOffscreenWindowPBufferStencilAlpha() { + if(!glDrawableFactory.canCreateGLPbuffer(null)) { + System.out.println("WARNING: PBuffer not supported on this platform - cannot test"); + return; + } GLCapabilities caps2 = WindowUtilNEWT.fixCaps(capsDefault, false, true, false); caps2.setStencilBits(8); caps2.setAlphaBits(8); @@ -133,6 +147,10 @@ public class TestOffscreen01NEWT { @Test public void test01cOffscreenWindowPBuffer555() { + if(!glDrawableFactory.canCreateGLPbuffer(null)) { + System.out.println("WARNING: PBuffer not supported on this platform - cannot test"); + return; + } GLCapabilities caps2 = WindowUtilNEWT.fixCaps(capsDefault, false, true, false); caps2.setRedBits(5); caps2.setGreenBits(5); @@ -142,6 +160,10 @@ public class TestOffscreen01NEWT { @Test public void test02Offscreen3Windows1DisplayPBuffer() { + if(!glDrawableFactory.canCreateGLPbuffer(null)) { + System.out.println("WARNING: PBuffer not supported on this platform - cannot test"); + return; + } GLCapabilities caps2 = WindowUtilNEWT.fixCaps(capsDefault, false, true, false); int winnum = 3, i; Window windows[] = new Window[winnum]; @@ -189,6 +211,10 @@ public class TestOffscreen01NEWT { @Test public void test03Offscreen3Windows3DisplaysPBuffer() { + if(!glDrawableFactory.canCreateGLPbuffer(null)) { + System.out.println("WARNING: PBuffer not supported on this platform - cannot test"); + return; + } GLCapabilities caps2 = WindowUtilNEWT.fixCaps(capsDefault, false, true, false); int winnum = 3, i; Display displays[] = new Display[winnum]; @@ -237,6 +263,10 @@ public class TestOffscreen01NEWT { @Test public void test04OffscreenSnapshotWithDemoPBuffer() { + if(!glDrawableFactory.canCreateGLPbuffer(null)) { + System.out.println("WARNING: PBuffer not supported on this platform - cannot test"); + return; + } GLCapabilities caps2 = WindowUtilNEWT.fixCaps(capsDefault, false, true, false); System.out.println("Create Window 1"); |