diff options
author | Sven Gothel <[email protected]> | 2011-04-08 14:51:22 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-04-08 14:51:22 +0200 |
commit | ab48dac3f4419ceac51fdf059f310f0f0499c4d7 (patch) | |
tree | a255186720c566af8a14281ff99dfde3434075cc /src/jogl/classes/javax | |
parent | a140ed4798896ed5d786fbe63e7241309a4b4a91 (diff) |
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
Diffstat (limited to 'src/jogl/classes/javax')
-rw-r--r-- | src/jogl/classes/javax/media/opengl/GLArrayData.java | 24 |
1 files changed, 18 insertions, 6 deletions
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(); |