summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/jogl/classes/jogamp/opengl/GLBufferStateTracker.java2
-rw-r--r--src/jogl/classes/jogamp/opengl/GLContextImpl.java4
2 files changed, 6 insertions, 0 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLBufferStateTracker.java b/src/jogl/classes/jogamp/opengl/GLBufferStateTracker.java
index 4a1a81bcb..7f5316fbd 100644
--- a/src/jogl/classes/jogamp/opengl/GLBufferStateTracker.java
+++ b/src/jogl/classes/jogamp/opengl/GLBufferStateTracker.java
@@ -91,6 +91,7 @@ public class GLBufferStateTracker {
bindingMap.setKeyNotFoundValue(0xFFFFFFFF);
// Start with known unbound targets for known keys
+ // setBoundBufferObject(GL2GL3.GL_VERTEX_ARRAY_BINDING, 0); // not using default VAO (removed in GL3 core) - only explicit
setBoundBufferObject(GL.GL_ARRAY_BUFFER, 0);
setBoundBufferObject(GL.GL_ELEMENT_ARRAY_BUFFER, 0);
setBoundBufferObject(GL2.GL_PIXEL_PACK_BUFFER, 0);
@@ -120,6 +121,7 @@ public class GLBufferStateTracker {
boolean gotQueryTarget = true;
int queryTarget = 0;
switch (target) {
+ case GL2GL3.GL_VERTEX_ARRAY_BINDING: queryTarget = GL2GL3.GL_VERTEX_ARRAY_BINDING; break;
case GL.GL_ARRAY_BUFFER: queryTarget = GL.GL_ARRAY_BUFFER_BINDING; break;
case GL.GL_ELEMENT_ARRAY_BUFFER: queryTarget = GL.GL_ELEMENT_ARRAY_BUFFER_BINDING; break;
case GL2.GL_PIXEL_PACK_BUFFER: queryTarget = GL2.GL_PIXEL_PACK_BUFFER_BINDING; break;
diff --git a/src/jogl/classes/jogamp/opengl/GLContextImpl.java b/src/jogl/classes/jogamp/opengl/GLContextImpl.java
index 376b3c0e5..9f7c9cf57 100644
--- a/src/jogl/classes/jogamp/opengl/GLContextImpl.java
+++ b/src/jogl/classes/jogamp/opengl/GLContextImpl.java
@@ -1790,6 +1790,10 @@ public abstract class GLContextImpl extends GLContext {
public final GLStateTracker getGLStateTracker() {
return glStateTracker;
}
+
+ public final boolean isDefaultVAO(int vao) {
+ return defaultVAO == vao;
+ }
//---------------------------------------------------------------------------
// Helpers for context optimization where the last context is left