aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax/media/opengl/GLArrayData.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/javax/media/opengl/GLArrayData.java')
-rw-r--r--src/jogl/classes/javax/media/opengl/GLArrayData.java37
1 files changed, 28 insertions, 9 deletions
diff --git a/src/jogl/classes/javax/media/opengl/GLArrayData.java b/src/jogl/classes/javax/media/opengl/GLArrayData.java
index 6c8122f27..448ddd10c 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
@@ -76,28 +75,41 @@ public interface GLArrayData {
* Sets the determined location of the shader attribute
* This is usually done within ShaderState.
*
- * @see com.jogamp.opengl.util.glsl.ShaderState#glVertexAttribPointer(GL2ES2, GLArrayData)
+ * @see com.jogamp.opengl.util.glsl.ShaderState#vertexAttribPointer(GL2ES2, 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();
@@ -112,14 +124,21 @@ public interface GLArrayData {
public int getComponentType();
/**
- * The components size in bytes
+ * The component's size in bytes
*/
public int getComponentSize();
/**
- * Return the number of elements.
+ * The current number of used elements.<br>
+ * In case the buffer's position is 0 (sealed, flipped), it's based on it's limit instead of it's position.
*/
public int getElementNumber();
+
+ /**
+ * The current number of used bytes.<br>
+ * In case the buffer's position is 0 (sealed, flipped), it's based on it's limit instead of it's position.
+ */
+ public int getByteSize();
/**
* True, if GL shall normalize fixed point data while converting