Skip to content

Commit

Permalink
Bug 1203: Fix TestGLAutoDrawableFactoryGLProfileDeviceNEWT: Do not as…
Browse files Browse the repository at this point in the history
…sume EGL/Desktop factories are available!
  • Loading branch information
sgothel committed Aug 29, 2015
1 parent 08217de commit cda92c2
Showing 1 changed file with 16 additions and 0 deletions.
Expand Up @@ -141,6 +141,10 @@ public void test00AvailableInfo() {
@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());
Expand All @@ -159,6 +163,10 @@ public void test01ES2OnEGL() throws InterruptedException {
@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());
Expand All @@ -179,6 +187,10 @@ public void test02GLOnEGL() throws InterruptedException {
@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());
Expand All @@ -197,6 +209,10 @@ public void test11ES2OnGL() throws InterruptedException {
@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());
Expand Down

0 comments on commit cda92c2

Please sign in to comment.