aboutsummaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-07-16 20:46:42 +0200
committerSven Gothel <[email protected]>2013-07-16 20:46:42 +0200
commit1a20ef3aa1dc9acedd7da0475ee19d4c40b18498 (patch)
tree491271ad5d447b8978c7d82494606653acf7afbd /src/test
parentdba2faf8520a43a809eb756869c6c97a0a2ef2cd (diff)
Redefine: isGLES3Compatible() and isGL4ES3(), i.e. allow GL4ES3 usage in case proper ES3_compat is given.
isGLES3Compatible() and isGL4ES3() of GLBase _and_ GLContext includes [ GL >= 4.3, GL >= 3.1 w/ GL_ARB_ES3_compatibility and GLES3 ]. Tested GL 'aliasing' w/ TestGLProfile01NEWT, i.e. isGL*() and getGL*().
Diffstat (limited to 'src/test')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile01NEWT.java69
1 files changed, 69 insertions, 0 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 d9429129b..47edf53bb 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
@@ -123,6 +123,17 @@ public class TestGLProfile01NEWT extends UITestCase {
System.out.println("GLProfile GL2ES2: "+glp);
dumpVersion(glp);
}
+
+ @Test
+ public void testGLProfileGL4ES3() throws InterruptedException {
+ if(!GLProfile.isAvailable(GLProfile.GL4ES3)) {
+ System.out.println("GLProfile GL4ES3 n/a");
+ return;
+ }
+ GLProfile glp = GLProfile.getGL4ES3();
+ System.out.println("GLProfile GL4ES3: "+glp);
+ dumpVersion(glp);
+ }
void testSpecificProfile(String glps) throws InterruptedException {
if(GLProfile.isAvailable(glps)) {
@@ -168,6 +179,11 @@ public class TestGLProfile01NEWT extends UITestCase {
testSpecificProfile(GLProfile.GLES2);
}
+ @Test
+ public void testGLES3() throws InterruptedException {
+ testSpecificProfile(GLProfile.GLES3);
+ }
+
protected void dumpVersion(GLProfile glp) throws InterruptedException {
GLCapabilities caps = new GLCapabilities(glp);
GLWindow glWindow = GLWindow.create(caps);
@@ -175,6 +191,59 @@ public class TestGLProfile01NEWT extends UITestCase {
glWindow.setTitle("TestGLProfile01NEWT");
glWindow.addGLEventListener(new DumpGLInfo());
+ glWindow.addGLEventListener(new GLEventListener() {
+
+ public void init(GLAutoDrawable drawable) {
+ final GL gl = drawable.getGL();
+ final GLProfile glp = gl.getGLProfile();
+ System.err.println("GL impl. class "+gl.getClass().getName());
+ if( gl.isGL4() ) {
+ Assert.assertNotNull( gl.getGL4() );
+ System.err.println("GL Mapping "+glp+" -> GL4");
+ }
+ if( gl.isGL4bc() ) {
+ Assert.assertNotNull( gl.getGL4bc() );
+ System.err.println("GL Mapping "+glp+" -> GL4bc");
+ }
+ if( gl.isGL3() ) {
+ Assert.assertNotNull( gl.getGL3() );
+ System.err.println("GL Mapping "+glp+" -> GL3");
+ }
+ if( gl.isGL3bc() ) {
+ Assert.assertNotNull( gl.getGL3bc() );
+ System.err.println("GL Mapping "+glp+" -> GL3bc");
+ }
+ if( gl.isGLES3() ) {
+ Assert.assertNotNull( gl.getGLES3() );
+ System.err.println("GL Mapping "+glp+" -> GLES3");
+ }
+ if( gl.isGLES2() ) {
+ Assert.assertNotNull( gl.getGLES2() );
+ System.err.println("GL Mapping "+glp+" -> GLES2");
+ }
+ if( gl.isGL4ES3() ) {
+ Assert.assertNotNull( gl.getGL4ES3() );
+ System.err.println("GL Mapping "+glp+" -> GL4ES3");
+ }
+ if( gl.isGL2ES2() ) {
+ Assert.assertNotNull( gl.getGL2ES2() );
+ System.err.println("GL Mapping "+glp+" -> GL2ES2");
+ }
+ if( gl.isGL2ES1() ) {
+ Assert.assertNotNull( gl.getGL2ES1() );
+ System.err.println("GL Mapping "+glp+" -> GL2ES1");
+ }
+ }
+
+ public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
+ }
+
+ public void display(GLAutoDrawable drawable) {
+ }
+
+ public void dispose(GLAutoDrawable drawable) {
+ }
+ });
glWindow.setSize(128, 128);
glWindow.setVisible(true);