diff options
author | Sven Gothel <[email protected]> | 2015-08-29 23:10:30 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2015-08-29 23:10:30 +0200 |
commit | cda92c2cc066c18ab30b828592e1979ab535441c (patch) | |
tree | 9b9895cebf56b3fca26aa23e05a6578200504a8e /src/test/com/jogamp/opengl | |
parent | 08217de7bc0e0ffd09bd6c85d8c6d55ac63cfa33 (diff) |
Bug 1203: Fix TestGLAutoDrawableFactoryGLProfileDeviceNEWT: Do not assume EGL/Desktop factories are available!
Diffstat (limited to 'src/test/com/jogamp/opengl')
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableFactoryGLProfileDeviceNEWT.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableFactoryGLProfileDeviceNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableFactoryGLProfileDeviceNEWT.java index 5f19e2b44..d940510cb 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableFactoryGLProfileDeviceNEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableFactoryGLProfileDeviceNEWT.java @@ -141,6 +141,10 @@ public class TestGLAutoDrawableFactoryGLProfileDeviceNEWT extends UITestCase { @Test public void test01ES2OnEGL() throws InterruptedException { final GLDrawableFactory factory = GLDrawableFactory.getEGLFactory(); + if( null == factory ) { + System.err.println("EGL Factory n/a"); + return; + } final GLProfile glp = getProfile(factory.getDefaultDevice(), GLProfile.GLES2); if(null != glp) { Assert.assertTrue("Not a GLES2 profile but "+glp, glp.isGLES2()); @@ -159,6 +163,10 @@ public class TestGLAutoDrawableFactoryGLProfileDeviceNEWT extends UITestCase { @Test public void test02GLOnEGL() throws InterruptedException { final GLDrawableFactory factory = GLDrawableFactory.getEGLFactory(); + if( null == factory ) { + System.err.println("EGL Factory n/a"); + return; + } final GLProfile glp = getProfile(factory.getDefaultDevice(), GLProfile.GL2GL3); if(null != glp) { Assert.assertTrue("Not a GL2GL3 profile but "+glp, glp.isGL2GL3()); @@ -179,6 +187,10 @@ public class TestGLAutoDrawableFactoryGLProfileDeviceNEWT extends UITestCase { @Test public void test11ES2OnGL() throws InterruptedException { final GLDrawableFactory factory = GLDrawableFactory.getDesktopFactory(); + if( null == factory ) { + System.err.println("Desktop Factory n/a"); + return; + } final GLProfile glp = getProfile(factory.getDefaultDevice(), GLProfile.GLES2); if(null != glp) { Assert.assertTrue("Not a GLES2 profile but "+glp, glp.isGLES2()); @@ -197,6 +209,10 @@ public class TestGLAutoDrawableFactoryGLProfileDeviceNEWT extends UITestCase { @Test public void test12GLOnGL() throws InterruptedException { final GLDrawableFactory factory = GLDrawableFactory.getDesktopFactory(); + if( null == factory ) { + System.err.println("Desktop Factory n/a"); + return; + } final GLProfile glp = getProfile(factory.getDefaultDevice(), GLProfile.GL2GL3); if(null != glp) { Assert.assertTrue("Not a GL2GL3 profile but "+glp, glp.isGL2GL3()); |