diff options
author | Sven Gothel <[email protected]> | 2013-04-14 06:28:44 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-04-14 06:28:44 +0200 |
commit | b414c4b1be05249590138e73558ada82bd170f15 (patch) | |
tree | 0475e627f78bcb94e56306b552b15dcc157b219a /src/jogl/classes/jogamp/opengl/GLBufferStateTracker.java | |
parent | d7096cfeee500177db85d97241cc142af41517cb (diff) |
Fix Bug 692: Add tracking of VERTEX_ARRAY_BINDING, and enable allowing a bound non default VAO to pass VBO enabled test, even if VBO is disabled.
VAO is available if: GL >= 3.0 or is having GL_ARB_vertex_array_object extension.
checkBufferObject(..) checks whether VERTEX_ARRAY_BINDING has a non default VAO bound in case
no VBO is being bound and VAO is allowed.
glBindVertexArray(int) is being tracked, i.e. on state VERTEX_ARRAY_BINDING
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/GLBufferStateTracker.java')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/GLBufferStateTracker.java | 2 |
1 files changed, 2 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; |