aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-12-21 13:50:52 +0100
committerSven Gothel <[email protected]>2013-12-21 13:50:52 +0100
commitbbb7f94c015fbfefdff672eb2d261fbd230c4e81 (patch)
tree06cbb52240d851ef24c5c54f816f46bff1f08a1c /src/jogl
parentded0a8fb68067e3dbb42ff4f6fce315a237afa8f (diff)
Bug 925: Use proper common profile and test compatibility for GLContextImpl's default VAO.
Diffstat (limited to 'src/jogl')
-rw-r--r--src/jogl/classes/jogamp/opengl/GLContextImpl.java19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLContextImpl.java b/src/jogl/classes/jogamp/opengl/GLContextImpl.java
index 8885c3220..083a88c51 100644
--- a/src/jogl/classes/jogamp/opengl/GLContextImpl.java
+++ b/src/jogl/classes/jogamp/opengl/GLContextImpl.java
@@ -67,8 +67,8 @@ import javax.media.nativewindow.NativeSurface;
import javax.media.nativewindow.NativeWindowFactory;
import javax.media.opengl.GL;
import javax.media.opengl.GL2ES2;
+import javax.media.opengl.GL2ES3;
import javax.media.opengl.GL2GL3;
-import javax.media.opengl.GL3ES3;
import javax.media.opengl.GLCapabilitiesImmutable;
import javax.media.opengl.GLContext;
import javax.media.opengl.GLDebugListener;
@@ -415,9 +415,9 @@ public abstract class GLContextImpl extends GLContext {
}
if ( 0 != defaultVAO ) {
final int[] tmp = new int[] { defaultVAO };
- final GL3ES3 gl3es3 = gl.getRootGL().getGL3ES3();
- gl3es3.glBindVertexArray(0);
- gl3es3.glDeleteVertexArrays(1, tmp, 0);
+ final GL2ES3 gl2es3 = gl.getRootGL().getGL2ES3();
+ gl2es3.glBindVertexArray(0);
+ gl2es3.glDeleteVertexArrays(1, tmp, 0);
defaultVAO = 0;
}
glDebugHandler.enable(false);
@@ -663,10 +663,13 @@ public abstract class GLContextImpl extends GLContext {
created = createImpl(shareWithHandle); // may throws exception if fails
if( created && hasNoDefaultVAO() ) {
final int[] tmp = new int[1];
- final GL3ES3 gl3es3 = gl.getRootGL().getGL3ES3();
- gl3es3.glGenVertexArrays(1, tmp, 0);
- defaultVAO = tmp[0];
- gl3es3.glBindVertexArray(defaultVAO);
+ final GL rootGL = gl.getRootGL();
+ if( rootGL.isGL2ES3() ) { // FIXME remove if ES2 == ES3 later
+ final GL2ES3 gl2es3 = rootGL.getGL2ES3();
+ gl2es3.glGenVertexArrays(1, tmp, 0);
+ defaultVAO = tmp[0];
+ gl2es3.glBindVertexArray(defaultVAO);
+ }
}
} finally {
if (null != shareWith) {