diff options
Diffstat (limited to 'make/config')
-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); } |