From ab48dac3f4419ceac51fdf059f310f0f0499c4d7 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 8 Apr 2011 14:51:22 +0200 Subject: FIX: Refactor GLArrayData and all it's implementations/sub-interfaces (VBO target, comments, names) VBO target: Allowing ELEMENT_VERTEX_ARRAY w/o corresponding GLSL/Fixed attribute Names: Clarified method named. Comments: Added and fixed comments --- .../classes/javax/media/opengl/GLArrayData.java | 24 ++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'src/jogl/classes/javax/media/opengl/GLArrayData.java') diff --git a/src/jogl/classes/javax/media/opengl/GLArrayData.java b/src/jogl/classes/javax/media/opengl/GLArrayData.java index 6c8122f27..b449ce232 100644 --- a/src/jogl/classes/javax/media/opengl/GLArrayData.java +++ b/src/jogl/classes/javax/media/opengl/GLArrayData.java @@ -37,7 +37,6 @@ import java.nio.*; * */ public interface GLArrayData { - /** * Returns true if this data set is intended for a GLSL vertex shader attribute, * otherwise false, ie intended for fixed function vertex pointer @@ -81,23 +80,36 @@ public interface GLArrayData { public void setLocation(int v); /** - * Determines wheather the data is server side (VBO), + * Determines whether the data is server side (VBO) and enabled, * or a client side array (false). */ public boolean isVBO(); /** - * The offset, if it's an VBO, otherwise -1 + * The VBO buffer offset or -1 if not a VBO */ - public long getOffset(); + public long getVBOOffset(); /** - * The VBO name, if it's an VBO, otherwise -1 + * The VBO name or -1 if not a VBO */ public int getVBOName(); /** - * The Buffer holding the data, may be null in case of VBO + * The VBO usage or -1 if not a VBO + * @return -1 if not a GPU buffer, otherwise {@link GL2ES2#GL_STREAM_DRAW}, {@link GL#GL_STATIC_DRAW} or {@link GL#GL_DYNAMIC_DRAW} + */ + public int getVBOUsage(); + + /** + * The VBO target or -1 if not a VBO + * @return -1 if not a GPU buffer, otherwise {@link GL#GL_ARRAY_BUFFER} or {@link GL#GL_ELEMENT_ARRAY_BUFFER} + */ + public int getVBOTarget(); + + + /** + * The Buffer holding the data, may be null if a GPU buffer without client bound data */ public Buffer getBuffer(); -- cgit v1.2.3