VertexArray or a
VertexBufferObject. Only the later supports OpenGL ES 2.0.
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | bind(ShaderProgram shader, int[]
array containing the attribute locations. locations)Binds this VertexData for rendering via glDrawArrays or glDrawElements. |
| public void | dispose()
Redeclares com. Disposes this VertexData and all its associated OpenGL resources. |
| public VertexAttributes | |
| public FloatBuffer | Returns: the underlying FloatBuffer holding the vertex data.
Deprecated
use
getBuffer(boolean) instead.
Returns the underlying FloatBuffer and marks it as dirty, causing the buffer contents to be uploaded on the next call to bind. |
| public FloatBuffer | Returns: the underlying FloatBuffer holding the vertex data.when true, the underlying buffer will be uploaded on the next call to bind. If you need immediate
uploading use forWriting)setVertices(float[], int, int).Returns the underlying FloatBuffer for reading or writing. |
| public int | |
| public int | |
| public void | |
| public void | setVertices(float[]
the vertex data vertices, int the offset to start copying the data from offset, int the number of floats to copy count)Sets the vertices of this VertexData, discarding the old vertex data. |
| public void | |
| public void | unbind(ShaderProgram shader, int[]
array containing the attribute locations. locations)Unbinds this VertexData. |
| public void | updateVertices(int targetOffset, float[]
the vertex data vertices, int the offset to start copying the data from sourceOffset, int the number of floats to copy count)Update (a portion of) the vertices. |
| bind | back to summary |
|---|---|
| public void bind(ShaderProgram shader) Binds this VertexData for rendering via glDrawArrays or glDrawElements. | |
| bind | back to summary |
|---|---|
| public void bind(ShaderProgram shader, int[] locations) Binds this VertexData for rendering via glDrawArrays or glDrawElements.
| |
| dispose | back to summary |
|---|---|
| public void dispose() Redeclares com. Disposes this VertexData and all its associated OpenGL resources. | |
| getAttributes | back to summary |
|---|---|
public VertexAttributes getAttributes()
| |
| getBuffer | back to summary |
|---|---|
| public FloatBuffer getBuffer()
Deprecated use Returns the underlying FloatBuffer and marks it as dirty, causing the buffer contents to be uploaded on the next call to
bind. If you need immediate uploading use
| |
| getBuffer | back to summary |
|---|---|
| public FloatBuffer getBuffer(boolean forWriting) Returns the underlying FloatBuffer for reading or writing.
| |
| getNumMaxVertices | back to summary |
|---|---|
public int getNumMaxVertices()
| |
| getNumVertices | back to summary |
|---|---|
public int getNumVertices()
| |
| invalidate | back to summary |
|---|---|
| public void invalidate() Invalidates the VertexData if applicable. Use this in case of a context loss. | |
| setVertices | back to summary |
|---|---|
| public void setVertices(float[] vertices, int offset, int count) Sets the vertices of this VertexData, discarding the old vertex data. The count must equal the number of floats per vertex
times the number of vertices to be copied to this VertexData. The order of the vertex attributes must be the same as
specified at construction time via This can be called in between calls to bind and unbind. The vertex data will be updated instantly.
| |
| unbind | back to summary |
|---|---|
| public void unbind(ShaderProgram shader) Unbinds this VertexData. | |
| unbind | back to summary |
|---|---|
| public void unbind(ShaderProgram shader, int[] locations) Unbinds this VertexData.
| |
| updateVertices | back to summary |
|---|---|
| public void updateVertices(int targetOffset, float[] vertices, int sourceOffset, int count) Update (a portion of) the vertices. Does not resize the backing buffer.
| |