diff options
author | Sven Gothel <[email protected]> | 2015-03-06 10:03:59 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2015-03-06 10:03:59 +0100 |
commit | 23f7addf6eefde27efe7e47c320ad31b7f81dc2c (patch) | |
tree | 354c1cb7a88f82ad36b4856b05c2eb01e9923c7a /src/jogl/classes/jogamp/opengl/GLBufferStateTracker.java | |
parent | 27ebb38b9ffd3cc8f4ee3b97509b0f32ef2680aa (diff) |
Bug 1135 - Cleanup: Class ownership change of static GL enumerates
GLBufferStateTracker now also supports GL4.GL_QUERY_BUFFER
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/GLBufferStateTracker.java')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/GLBufferStateTracker.java | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLBufferStateTracker.java b/src/jogl/classes/jogamp/opengl/GLBufferStateTracker.java index 0742f7b05..2aa4c4297 100644 --- a/src/jogl/classes/jogamp/opengl/GLBufferStateTracker.java +++ b/src/jogl/classes/jogamp/opengl/GLBufferStateTracker.java @@ -41,7 +41,6 @@ package jogamp.opengl; import com.jogamp.opengl.*; - import com.jogamp.common.util.IntIntHashMap; import com.jogamp.common.util.PropertyAccess; @@ -103,7 +102,7 @@ public class GLBufferStateTracker { // Start with known unbound targets for known keys // setBoundBufferObject(GL2ES3.GL_VERTEX_ARRAY_BINDING, 0); // not using default VAO (removed in GL3 core) - only explicit setBoundBufferObject(GL.GL_ARRAY_BUFFER, 0); - setBoundBufferObject(GL4.GL_DRAW_INDIRECT_BUFFER, 0); + setBoundBufferObject(GL3ES3.GL_DRAW_INDIRECT_BUFFER, 0); setBoundBufferObject(GL.GL_ELEMENT_ARRAY_BUFFER, 0); setBoundBufferObject(GL2ES3.GL_PIXEL_PACK_BUFFER, 0); setBoundBufferObject(GL2ES3.GL_PIXEL_UNPACK_BUFFER, 0); @@ -131,16 +130,16 @@ public class GLBufferStateTracker { private static final int getQueryName(final int target) { switch (target) { case GL.GL_ARRAY_BUFFER: return GL.GL_ARRAY_BUFFER_BINDING; - case GL4.GL_ATOMIC_COUNTER_BUFFER: return GL4.GL_ATOMIC_COUNTER_BUFFER_BINDING; + case GL2ES3.GL_ATOMIC_COUNTER_BUFFER: return GL2ES3.GL_ATOMIC_COUNTER_BUFFER_BINDING; case GL2ES3.GL_COPY_READ_BUFFER: return GL2ES3.GL_COPY_READ_BUFFER_BINDING; case GL2ES3.GL_COPY_WRITE_BUFFER: return GL2ES3.GL_COPY_WRITE_BUFFER_BINDING; - case GL4.GL_DRAW_INDIRECT_BUFFER: return GL4.GL_DRAW_INDIRECT_BUFFER_BINDING; - case GL4.GL_DISPATCH_INDIRECT_BUFFER: return GL4.GL_DISPATCH_INDIRECT_BUFFER_BINDING; + case GL3ES3.GL_DRAW_INDIRECT_BUFFER: return GL3ES3.GL_DRAW_INDIRECT_BUFFER_BINDING; + case GL3ES3.GL_DISPATCH_INDIRECT_BUFFER: return GL3ES3.GL_DISPATCH_INDIRECT_BUFFER_BINDING; case GL.GL_ELEMENT_ARRAY_BUFFER: return GL.GL_ELEMENT_ARRAY_BUFFER_BINDING; - case GL2ES3.GL_PIXEL_PACK_BUFFER: return GL2ES3.GL_PIXEL_PACK_BUFFER_BINDING; - case GL2ES3.GL_PIXEL_UNPACK_BUFFER: return GL2ES3.GL_PIXEL_UNPACK_BUFFER_BINDING; - // FIXME case GL4.GL_QUERY_BUFFER: return GL4.GL_QUERY_BUFFER_BINDING; - case GL4.GL_SHADER_STORAGE_BUFFER: return GL4.GL_SHADER_STORAGE_BUFFER_BINDING; + case GL2ES3.GL_PIXEL_PACK_BUFFER: return GL2ES3.GL_PIXEL_PACK_BUFFER_BINDING; + case GL2ES3.GL_PIXEL_UNPACK_BUFFER: return GL2ES3.GL_PIXEL_UNPACK_BUFFER_BINDING; + case GL4.GL_QUERY_BUFFER: return GL4.GL_QUERY_BUFFER_BINDING; + case GL3ES3.GL_SHADER_STORAGE_BUFFER: return GL3ES3.GL_SHADER_STORAGE_BUFFER_BINDING; case GL2GL3.GL_TEXTURE_BUFFER: return GL2GL3.GL_TEXTURE_BINDING_BUFFER; case GL2ES3.GL_TRANSFORM_FEEDBACK_BUFFER: return GL2ES3.GL_TRANSFORM_FEEDBACK_BUFFER_BINDING; case GL2ES3.GL_UNIFORM_BUFFER: return GL2ES3.GL_UNIFORM_BUFFER_BINDING; @@ -154,16 +153,16 @@ public class GLBufferStateTracker { private static final void checkTargetName(final int target) { switch (target) { case GL.GL_ARRAY_BUFFER: - case GL4.GL_ATOMIC_COUNTER_BUFFER: + case GL2ES3.GL_ATOMIC_COUNTER_BUFFER: case GL2ES3.GL_COPY_READ_BUFFER: case GL2ES3.GL_COPY_WRITE_BUFFER: - case GL4.GL_DRAW_INDIRECT_BUFFER: - case GL4.GL_DISPATCH_INDIRECT_BUFFER: + case GL3ES3.GL_DRAW_INDIRECT_BUFFER: + case GL3ES3.GL_DISPATCH_INDIRECT_BUFFER: case GL.GL_ELEMENT_ARRAY_BUFFER: case GL2ES3.GL_PIXEL_PACK_BUFFER: case GL2ES3.GL_PIXEL_UNPACK_BUFFER: - // FIXME case GL4.GL_QUERY_BUFFER: - case GL4.GL_SHADER_STORAGE_BUFFER: + case GL4.GL_QUERY_BUFFER: + case GL3ES3.GL_SHADER_STORAGE_BUFFER: case GL2GL3.GL_TEXTURE_BUFFER: case GL2ES3.GL_TRANSFORM_FEEDBACK_BUFFER: case GL2ES3.GL_UNIFORM_BUFFER: |