diff options
author | Sven Gothel <[email protected]> | 2011-04-22 05:18:55 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-04-22 05:18:55 +0200 |
commit | 570d7df455ee0005ced53bddeb05adb04436fe3f (patch) | |
tree | c09f696876e50dfe063c9319b216a140549530b7 /make | |
parent | 3dc5b9090dd84655a95958dea7e59be8fdc9662c (diff) |
Add GL: glGetBufferSize(int buffer) - buffer size tracking, and add comments ..
Diffstat (limited to 'make')
-rw-r--r-- | make/config/jogl/gl-if-CustomJavaCode-gl.java | 19 | ||||
-rw-r--r-- | make/config/jogl/gl-impl-CustomJavaCode-common.java | 6 |
2 files changed, 23 insertions, 2 deletions
diff --git a/make/config/jogl/gl-if-CustomJavaCode-gl.java b/make/config/jogl/gl-if-CustomJavaCode-gl.java index 1ff8b8e8e..4741b2df5 100644 --- a/make/config/jogl/gl-if-CustomJavaCode-gl.java +++ b/make/config/jogl/gl-if-CustomJavaCode-gl.java @@ -58,8 +58,25 @@ public void glDepthRange(double zNear, double zFar); + /** + * @param target a GL buffer (VBO) target as used in {@link GL#glBindBuffer(int, int)}, ie {@link GL#GL_ELEMENT_ARRAY_BUFFER}, {@link GL#GL_ARRAY_BUFFER}, .. + * @return the GL buffer (VBO) name bound to a target via {@link GL#glBindBuffer(int, int)} or 0 if unbound. + */ public int glGetBoundBuffer(int target); + /** + * @param buffer a GL buffer name, generated with {@link GL#glGenBuffers(int, int[], int)} and used in {@link GL#glBindBuffer(int, int)}, {@link GL#glBufferData(int, long, java.nio.Buffer, int)} or {@link GL2#glNamedBufferDataEXT(int, long, java.nio.Buffer, int)} for example. + * @return the size of the given GL buffer + */ + public long glGetBufferSize(int buffer); + + /** + * @return true if a VBO is bound to {@link GL.GL_ARRAY_BUFFER} via {@link GL#glBindBuffer(int, int)}, otherwise false + */ public boolean glIsVBOArrayEnabled(); - public boolean glIsVBOElementEnabled(); + + /** + * @return true if a VBO is bound to {@link GL.GL_ELEMENT_ARRAY_BUFFER} via {@link GL#glBindBuffer(int, int)}, otherwise false + */ + public boolean glIsVBOElementArrayEnabled(); diff --git a/make/config/jogl/gl-impl-CustomJavaCode-common.java b/make/config/jogl/gl-impl-CustomJavaCode-common.java index 4872490b0..0a8e90171 100644 --- a/make/config/jogl/gl-impl-CustomJavaCode-common.java +++ b/make/config/jogl/gl-impl-CustomJavaCode-common.java @@ -7,11 +7,15 @@ return bufferStateTracker.getBoundBufferObject(target, this); } + public long glGetBufferSize(int buffer) { + return bufferSizeTracker.getDirectStateBufferSize(buffer, this); + } + public boolean glIsVBOArrayEnabled() { return checkArrayVBOEnabled(false); } - public boolean glIsVBOElementEnabled() { + public boolean glIsVBOElementArrayEnabled() { return checkElementVBOEnabled(false); } |