diff options
author | Sven Gothel <[email protected]> | 2011-04-22 06:03:44 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-04-22 06:03:44 +0200 |
commit | bf8a54b502f0fcd930e12a8bbda65f9538e8a2f7 (patch) | |
tree | 88ebdb21601f576674ca69fee8aaf5e6847b5fd7 /src/jogl/classes/javax/media/opengl/GLArrayData.java | |
parent | d72745fa32a86a3820e5220643a01153e3f21fe7 (diff) |
GLArrayData API and impl. changes
+++
Remove GL parameter for
- createFixed(..)
- createGLSL(..)
validation at client/server array data happens at 1st enableBuffer() call,
no current context or profile required at creation time.
Added ShaderState for createGLSL(..) clarifying dependency to the ShaderState,
passing it down to the GLSLArrayHandler, which also removes the TLS GLContext.getCurrent() call.
+++
Partially reverted ab48dac3f4419ceac51fdf059f310f0f0499c4d7 factory methods:
removed added vboTarget parameter, since all createFixed and createGLSL are GL_ARRAY_BUFFER (VBO).
Adding createData(..) factory method in GLArrayDataServer allowing diff vbo targets,
ie GL_ELEMENT_ARRAY_BUFFER .. or none.
Diffstat (limited to 'src/jogl/classes/javax/media/opengl/GLArrayData.java')
-rw-r--r-- | src/jogl/classes/javax/media/opengl/GLArrayData.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/jogl/classes/javax/media/opengl/GLArrayData.java b/src/jogl/classes/javax/media/opengl/GLArrayData.java index b449ce232..f375be623 100644 --- a/src/jogl/classes/javax/media/opengl/GLArrayData.java +++ b/src/jogl/classes/javax/media/opengl/GLArrayData.java @@ -124,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 |