diff options
author | Sven Gothel <[email protected]> | 2013-12-23 23:09:23 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-12-23 23:09:23 +0100 |
commit | 3120d4ad150a24b370d7c64b3af3f0557097e979 (patch) | |
tree | 7bfc77de677c35f28d1e7d406fd31099997e76b9 /src/test | |
parent | ac705f0d6eea7c8ba27a7cf7c42674c7446576b4 (diff) |
Bug 930 - OSX: Using 'Apple Software Renderer' GLRendererQuirks Quirk GL4NeedsGL3Request not set
GL3 core version validation failed due to missing braces around 'isES' _and_ term,
where the latter consist out of 2 _or_ terms testing version mismatch.
On OSX we validate a GL3 core context first and expect it to return a GL4 version if available,
which in turn triggers the quirk GL4NeedsGL3Request.
This behavior was disabled due to above mentioned bug, where the unqual major version caused
the validation to fail.
TestGLProfile01NEWT: Fixed 'GL4ES3' test, where 'GL4ES3' is only available
if extension <code>GL_ARB_ES3_compatibility</code> is available as well.
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile01NEWT.java | 61 |
1 files changed, 50 insertions, 11 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile01NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile01NEWT.java index 76dc9e9fd..88d643aa6 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile01NEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile01NEWT.java @@ -73,13 +73,18 @@ public class TestGLProfile01NEWT extends UITestCase { } static void validate(GLProfile glp) { + final boolean gles3CompatAvail = GLContext.isGLES3CompatibleAvailable(GLProfile.getDefaultDevice()); if( glp.getImplName().equals(GLProfile.GL4bc) ) { Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL4bc)); Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL4)); Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL3bc)); Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2)); Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2GL3)); - Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL4ES3)); + if( gles3CompatAvail ) { + Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL4ES3)); + } else { + Assert.assertFalse(GLProfile.isAvailable(GLProfile.GL4ES3)); + } Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2ES1)); Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2ES2)); } else if(glp.getImplName().equals(GLProfile.GL3bc)) { @@ -98,7 +103,11 @@ public class TestGLProfile01NEWT extends UITestCase { Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL4)); Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL3)); Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2GL3)); - Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL4ES3)); + if( gles3CompatAvail ) { + Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL4ES3)); + } else { + Assert.assertFalse(GLProfile.isAvailable(GLProfile.GL4ES3)); + } Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2ES2)); } else if(glp.getImplName().equals(GLProfile.GL3)) { Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL3)); @@ -106,7 +115,11 @@ public class TestGLProfile01NEWT extends UITestCase { Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2ES2)); } else if(glp.getImplName().equals(GLProfile.GLES3)) { Assert.assertTrue(GLProfile.isAvailable(GLProfile.GLES3)); - Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL4ES3)); + if( gles3CompatAvail ) { + Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL4ES3)); + } else { + Assert.assertFalse(GLProfile.isAvailable(GLProfile.GL4ES3)); + } Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2ES2)); } else if(glp.getImplName().equals(GLProfile.GLES2)) { Assert.assertTrue(GLProfile.isAvailable(GLProfile.GLES2)); @@ -157,13 +170,20 @@ public class TestGLProfile01NEWT extends UITestCase { } static void validate(GL gl) { + final GLContext ctx = gl.getContext(); + final boolean gles3CompatAvail = ctx.isGLES3Compatible(); + if( gl.isGL4bc() ) { Assert.assertTrue(gl.isGL4()); Assert.assertTrue(gl.isGL3bc()); Assert.assertTrue(gl.isGL3()); Assert.assertTrue(gl.isGL2()); Assert.assertTrue(gl.isGL2GL3()); - Assert.assertTrue(gl.isGL4ES3()); + if( gles3CompatAvail ) { + Assert.assertTrue(gl.isGL4ES3()); + } else { + Assert.assertFalse(gl.isGL4ES3()); + } Assert.assertTrue(gl.isGL3ES3()); Assert.assertTrue(gl.isGL2ES1()); Assert.assertTrue(gl.isGL2ES2()); @@ -180,7 +200,11 @@ public class TestGLProfile01NEWT extends UITestCase { } else if(gl.isGL4()) { Assert.assertTrue(gl.isGL3()); Assert.assertTrue(gl.isGL2GL3()); - Assert.assertTrue(gl.isGL4ES3()); + if( gles3CompatAvail ) { + Assert.assertTrue(gl.isGL4ES3()); + } else { + Assert.assertFalse(gl.isGL4ES3()); + } Assert.assertTrue(gl.isGL3ES3()); Assert.assertTrue(gl.isGL2ES2()); } else if(gl.isGL3()) { @@ -188,7 +212,11 @@ public class TestGLProfile01NEWT extends UITestCase { Assert.assertTrue(gl.isGL3ES3()); Assert.assertTrue(gl.isGL2ES2()); } else if(gl.isGLES3()) { - Assert.assertTrue(gl.isGL4ES3()); + if( gles3CompatAvail ) { + Assert.assertTrue(gl.isGL4ES3()); + } else { + Assert.assertFalse(gl.isGL4ES3()); + } Assert.assertTrue(gl.isGL3ES3()); Assert.assertTrue(gl.isGL2ES2()); } else if(gl.isGLES2()) { @@ -197,14 +225,17 @@ public class TestGLProfile01NEWT extends UITestCase { Assert.assertTrue(gl.isGL2ES1()); } - final GLContext ctx = gl.getContext(); if( ctx.isGL4bc() ) { Assert.assertTrue(ctx.isGL4()); Assert.assertTrue(ctx.isGL3bc()); Assert.assertTrue(ctx.isGL3()); Assert.assertTrue(ctx.isGL2()); Assert.assertTrue(ctx.isGL2GL3()); - Assert.assertTrue(ctx.isGL4ES3()); + if( gles3CompatAvail ) { + Assert.assertTrue(ctx.isGL4ES3()); + } else { + Assert.assertFalse(ctx.isGL4ES3()); + } Assert.assertTrue(ctx.isGL3ES3()); Assert.assertTrue(ctx.isGL2ES1()); Assert.assertTrue(ctx.isGL2ES2()); @@ -221,7 +252,11 @@ public class TestGLProfile01NEWT extends UITestCase { } else if(ctx.isGL4()) { Assert.assertTrue(ctx.isGL3()); Assert.assertTrue(ctx.isGL2GL3()); - Assert.assertTrue(ctx.isGL4ES3()); + if( gles3CompatAvail ) { + Assert.assertTrue(ctx.isGL4ES3()); + } else { + Assert.assertFalse(ctx.isGL4ES3()); + } Assert.assertTrue(ctx.isGL3ES3()); Assert.assertTrue(ctx.isGL2ES2()); } else if(ctx.isGL3()) { @@ -229,7 +264,11 @@ public class TestGLProfile01NEWT extends UITestCase { Assert.assertTrue(ctx.isGL3ES3()); Assert.assertTrue(ctx.isGL2ES2()); } else if(ctx.isGLES3()) { - Assert.assertTrue(ctx.isGL4ES3()); + if( gles3CompatAvail ) { + Assert.assertTrue(ctx.isGL4ES3()); + } else { + Assert.assertFalse(ctx.isGL4ES3()); + } Assert.assertTrue(ctx.isGL3ES3()); Assert.assertTrue(ctx.isGL2ES2()); } else if(ctx.isGLES2()) { @@ -363,7 +402,7 @@ public class TestGLProfile01NEWT extends UITestCase { public void init(GLAutoDrawable drawable) { final GL gl = drawable.getGL(); - System.err.println(JoglVersion.getGLStrings(gl, null, false)); + System.err.println(JoglVersion.getGLStrings(gl, null, true)); validate(gl); |