aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/com/jogamp/opengl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-07-15 13:39:22 +0200
committerSven Gothel <[email protected]>2013-07-15 13:39:22 +0200
commit3a0d7703da32e9a5ddf08a334f18588a78038d88 (patch)
tree48c8d89fa29e4425bcb25056d9396e9ea4db44d1 /src/test/com/jogamp/opengl
parent2b6f60f67e470da2217dfc8ea9ddd566357715d4 (diff)
Add Support for GL 4.3 (Bug 716) and ES 3.0 (Bug 717)
ES3 / GL4.3: - Update all EGL, GLX, WGL and GL (desktop and mobile) khronos headers to latest version. - GL3/gl3* -> GL/glcorearb* - Explicitly preserve ES2_compatibility and ES3_compatibility in header, most extension grouping was removed in new headers. - Always load all GLHeader to ensure proper extension association across all profiles. - Unified method signatures - Added GL_EXT_map_buffer_range to core - Using common 'glMapBufferImpl(..)' for all glMapBuffer(..) and glMapBufferRange(..) impl. - Init necessary fields of GL instances via 'finalizeInit()' called by reflection, if exist. This allows removing initialization checks, i.e. for all buffer validations. - BuildStaticGLInfo: Can handle new GL header structure, i.e. one CPP extenstion block incl. define + funcs. - GLJavaMethodBindingEmitter: Simply print the - No GL duplication due to new intermediate interfaces, see below - OO lineare inheritance (Added GL2ES3, GL3ES3 and GL4ES3 intemediates): GLBase - GL - GL2ES2 - GLES2 GLBase - GL - GL2ES2 - GL2GL3 - [ GL2, GL3 ] GLBase - GL - GL2ES2 - GL2ES3 - GL3ES3 - [ GL3 ] GLBase - GL - GL2ES2 - GL2ES3 - GL3ES3 - GL4ES3 - [ GLES3, GL4, .. ] - Expose 'usable' intermediate interfaces GL3ES3 and GL4ES3 in GLBase/GLProfile/GLContext via is*() and get*(). - GLContext*: - isGL3core() is true if [ GL4, GL3, GLES3 ] (added GLES3) - Added ctxProfile argument to allow handling ES versions: - getMaxMajor(..), getMaxMinor(..), isValidGLVersion(..) and decrementGLVersion(..) - mapGLVersions(..) prepared for ES ARB/KHR validation - EGLContext checks ES3 (via old ctx's GL_VERSION) - ExtensionAvailabilityCache adds GL_ES_Version_X_Y for ES. - Prelim tests w/ Mesa 9.1.3 GL Version 3.0 (ES profile, ES2 compat, ES3 compat, FBO, hardware) - OpenGL ES 3.0 Mesa 9.1.3 [GL 3.0.0, vendor 9.1.3 (Mesa 9.1.3)] - TODO: - Use KHR_create_context in EGLContext.createContextARBImpl(..) - More tests (Mobile, ..) +++ Misc: - GLContext*: - Complete glAllocateMemoryNV w/ glFreeMemoryNV.
Diffstat (limited to 'src/test/com/jogamp/opengl')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLDebug00NEWT.java13
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLDebug01NEWT.java12
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestMainVersionGLWindowNEWT.java6
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestGearsES2NEWT.java6
4 files changed, 22 insertions, 15 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLDebug00NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLDebug00NEWT.java
index 62e74466f..629a613e9 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLDebug00NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLDebug00NEWT.java
@@ -42,7 +42,6 @@ import javax.media.opengl.GLProfile;
import org.junit.Assert;
import org.junit.Test;
-import org.junit.BeforeClass;
import com.jogamp.newt.Display;
import com.jogamp.newt.NewtFactory;
@@ -144,9 +143,9 @@ public class TestGLDebug00NEWT extends UITestCase {
WindowContext winctx = createWindow(glp, true);
MyGLDebugListener myGLDebugListener = new MyGLDebugListener(
- GL2GL3.GL_DEBUG_SOURCE_API_ARB,
- GL2GL3.GL_DEBUG_TYPE_ERROR_ARB,
- GL2GL3.GL_DEBUG_SEVERITY_HIGH_ARB);
+ GL2GL3.GL_DEBUG_SOURCE_API,
+ GL2GL3.GL_DEBUG_TYPE_ERROR,
+ GL2GL3.GL_DEBUG_SEVERITY_HIGH);
winctx.context.addGLDebugListener(myGLDebugListener);
GL gl = winctx.context.getGL();
@@ -171,10 +170,10 @@ public class TestGLDebug00NEWT extends UITestCase {
Assert.assertEquals((null == glDebugExt) ? false : true, winctx.context.isGLDebugMessageEnabled());
if( winctx.context.isGLDebugMessageEnabled() ) {
- winctx.context.glDebugMessageInsert(GL2GL3.GL_DEBUG_SOURCE_APPLICATION_ARB,
- GL2GL3.GL_DEBUG_TYPE_OTHER_ARB,
+ winctx.context.glDebugMessageInsert(GL2GL3.GL_DEBUG_SOURCE_APPLICATION,
+ GL2GL3.GL_DEBUG_TYPE_OTHER,
dbgTstId0,
- GL2GL3.GL_DEBUG_SEVERITY_MEDIUM_ARB, dbgTstMsg0);
+ GL2GL3.GL_DEBUG_SEVERITY_MEDIUM, dbgTstMsg0);
Assert.assertEquals(true, myGLDebugListener.received());
}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLDebug01NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLDebug01NEWT.java
index f9b566c25..5cace1eb9 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLDebug01NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLDebug01NEWT.java
@@ -91,10 +91,10 @@ public class TestGLDebug01NEWT extends UITestCase {
if(ctx.isGLDebugMessageEnabled() && null != dbgTstMsg && 0 <= dbgTstId) {
window.invoke(true, new GLRunnable() {
public boolean run(GLAutoDrawable drawable) {
- drawable.getContext().glDebugMessageInsert(GL2GL3.GL_DEBUG_SOURCE_APPLICATION_ARB,
- GL2GL3.GL_DEBUG_TYPE_OTHER_ARB,
+ drawable.getContext().glDebugMessageInsert(GL2GL3.GL_DEBUG_SOURCE_APPLICATION,
+ GL2GL3.GL_DEBUG_TYPE_OTHER,
dbgTstId,
- GL2GL3.GL_DEBUG_SEVERITY_MEDIUM_ARB, dbgTstMsg);
+ GL2GL3.GL_DEBUG_SEVERITY_MEDIUM, dbgTstMsg);
return true;
}
});
@@ -121,9 +121,9 @@ public class TestGLDebug01NEWT extends UITestCase {
GLWindow window = createWindow(glp, true);
MyGLDebugListener myGLDebugListener = new MyGLDebugListener(
- GL2GL3.GL_DEBUG_SOURCE_API_ARB,
- GL2GL3.GL_DEBUG_TYPE_ERROR_ARB,
- GL2GL3.GL_DEBUG_SEVERITY_HIGH_ARB);
+ GL2GL3.GL_DEBUG_SOURCE_API,
+ GL2GL3.GL_DEBUG_TYPE_ERROR,
+ GL2GL3.GL_DEBUG_SEVERITY_HIGH);
window.getContext().addGLDebugListener(myGLDebugListener);
window.invoke(true, new GLRunnable() {
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestMainVersionGLWindowNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestMainVersionGLWindowNEWT.java
index 41c6063dc..24ba59b57 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestMainVersionGLWindowNEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestMainVersionGLWindowNEWT.java
@@ -36,6 +36,7 @@ import com.jogamp.opengl.JoglVersion;
import com.jogamp.opengl.test.junit.util.UITestCase;
public class TestMainVersionGLWindowNEWT extends UITestCase {
+ private static String[] args = null;
@Test
public void testMain() throws InterruptedException {
@@ -44,11 +45,12 @@ public class TestMainVersionGLWindowNEWT extends UITestCase {
System.out.println("Implementation-Build: "+j.getImplementationBuild());
System.out.println("Implementation-Branch: "+j.getImplementationBranch());
System.out.println("Implementation-Commit: "+j.getImplementationCommit());
- GLWindow.main(null);
+ GLWindow.main(args);
}
- public static void main(String args[]) throws IOException {
+ public static void main(String[] args) throws IOException {
+ TestMainVersionGLWindowNEWT.args = args;
String tstname = TestMainVersionGLWindowNEWT.class.getName();
org.junit.runner.JUnitCore.main(tstname);
}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestGearsES2NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestGearsES2NEWT.java
index a876b5c96..1a049c728 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestGearsES2NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestGearsES2NEWT.java
@@ -86,6 +86,7 @@ public class TestGearsES2NEWT extends UITestCase {
static int loops = 1;
static boolean loop_shutdown = false;
static boolean forceES2 = false;
+ static boolean forceES3 = false;
static boolean forceGL3 = false;
static boolean mainRun = false;
static boolean exclusiveContext = false;
@@ -358,6 +359,8 @@ public class TestGearsES2NEWT extends UITestCase {
final GLProfile glp;
if(forceGL3) {
glp = GLProfile.get(GLProfile.GL3);
+ } else if(forceES3) {
+ glp = GLProfile.get(GLProfile.GLES3);
} else if(forceES2) {
glp = GLProfile.get(GLProfile.GLES2);
} else {
@@ -433,6 +436,8 @@ public class TestGearsES2NEWT extends UITestCase {
useAnimator = false;
} else if(args[i].equals("-es2")) {
forceES2 = true;
+ } else if(args[i].equals("-es3")) {
+ forceES3 = true;
} else if(args[i].equals("-gl3")) {
forceGL3 = true;
} else if(args[i].equals("-wait")) {
@@ -499,6 +504,7 @@ public class TestGearsES2NEWT extends UITestCase {
System.err.println("loops "+loops);
System.err.println("loop shutdown "+loop_shutdown);
System.err.println("forceES2 "+forceES2);
+ System.err.println("forceES3 "+forceES3);
System.err.println("forceGL3 "+forceGL3);
System.err.println("swapInterval "+swapInterval);
System.err.println("exclusiveContext "+exclusiveContext);