|
libgdx API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IndexData
An IndexData instance holds index data. Can be either a plain short buffer or an OpenGL buffer object.
Method Summary | |
---|---|
void |
bind()
Binds this IndexBufferObject for rendering with glDrawElements. |
void |
dispose()
Disposes this IndexDatat and all its associated OpenGL resources. |
java.nio.ShortBuffer |
getBuffer()
Returns the underlying ShortBuffer. |
int |
getNumIndices()
|
int |
getNumMaxIndices()
|
void |
invalidate()
Invalidates the IndexBufferObject so a new OpenGL buffer handle is created. |
void |
setIndices(short[] indices,
int offset,
int count)
Sets the indices of this IndexBufferObject, discarding the old indices. |
void |
unbind()
Unbinds this IndexBufferObject. |
Method Detail |
---|
int getNumIndices()
int getNumMaxIndices()
void setIndices(short[] indices, int offset, int count)
Sets the indices of this IndexBufferObject, discarding the old indices. The count must equal the number of indices to be copied to this IndexBufferObject.
This can be called in between calls to bind()
and unbind()
. The index data will be updated instantly.
indices
- the vertex dataoffset
- the offset to start copying the data fromcount
- the number of floats to copyjava.nio.ShortBuffer getBuffer()
Returns the underlying ShortBuffer. If you modify the buffer contents they wil be uploaded on the call to bind()
.
If you need immediate uploading use setIndices(short[], int, int)
.
void bind()
void unbind()
void invalidate()
void dispose()
dispose
in interface Disposable
|
libgdx API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |