| Modifier and Type | Field and Description |
|---|---|
| pack-priv final ShortBuffer | |
| pack-priv final ByteBuffer | |
| private final boolean |
| Access | Constructor and Description |
|---|---|
| public | IndexArray(int
the maximum number of indices this buffer can hold maxIndices)Creates a new IndexArray to be used with vertex arrays. |
| Modifier and Type | Method and Description |
|---|---|
| public void | bind()
Implements com. Binds this IndexArray for rendering with glDrawElements. |
| public void | dispose()
Implements com. Disposes this IndexArray and all its associated OpenGL resources. |
| public ShortBuffer | getBuffer()
Implements com.
Deprecated
use
getBuffer(boolean) instead
Returns the underlying ShortBuffer. |
| public ShortBuffer | getBuffer(boolean forWriting)
Implements com. Returns the underlying ShortBuffer for reading or writing. |
| public int | getNumIndices()
Implements com. Returns: the number of indices currently stored in this buffer |
| public int | getNumMaxIndices()
Implements com. Returns: the maximum number of indices this IndexArray can store. |
| public void | invalidate()
Implements com. Invalidates the IndexArray so a new OpenGL buffer handle is created. |
| public void | setIndices(short[]
the vertex data indices, int the offset to start copying the data from offset, int the number of shorts to copy count)Implements com. Sets the indices of this IndexArray, discarding the old indices. |
| public void | setIndices(ShortBuffer indices)
Implements com. Copies the specified indices to the indices of this IndexBufferObject, discarding the old indices. |
| public void | |
| public void | updateIndices(int targetOffset, short[] indices, int offset, int count)
Implements com. Update (a portion of) the indices. |
| buffer | back to summary |
|---|---|
| pack-priv final ShortBuffer buffer | |
| byteBuffer | back to summary |
|---|---|
| pack-priv final ByteBuffer byteBuffer | |
| empty | back to summary |
|---|---|
| private final boolean empty | |
| IndexArray | back to summary |
|---|---|
| public IndexArray(int maxIndices) Creates a new IndexArray to be used with vertex arrays.
| |
| bind | back to summary |
|---|---|
| public void bind() Implements com. Binds this IndexArray for rendering with glDrawElements. | |
| dispose | back to summary |
|---|---|
| public void dispose() Implements com. Disposes this IndexArray and all its associated OpenGL resources. | |
| getBuffer | back to summary |
|---|---|
| public ShortBuffer getBuffer() Implements com. Doc from com. Deprecated use
Returns the underlying ShortBuffer. If you modify the buffer contents they will be uploaded on the next call to
| |
| getBuffer | back to summary |
|---|---|
| public ShortBuffer getBuffer(boolean forWriting) Implements com. Doc from com. Returns the underlying ShortBuffer for reading or writing.
| |
| getNumIndices | back to summary |
|---|---|
| public int getNumIndices() Implements com.
| |
| getNumMaxIndices | back to summary |
|---|---|
| public int getNumMaxIndices() Implements com.
| |
| invalidate | back to summary |
|---|---|
| public void invalidate() Implements com. Invalidates the IndexArray so a new OpenGL buffer handle is created. Use this in case of a context loss. | |
| setIndices | back to summary |
|---|---|
| public void setIndices(short[] indices, int offset, int count) Implements com. Sets the indices of this IndexArray, discarding the old indices. The count must equal the number of indices to be copied to this IndexArray.
This can be called in between calls to
| |
| setIndices | back to summary |
|---|---|
| public void setIndices(ShortBuffer indices) Implements com. Doc from com. Copies the specified indices to the indices of this IndexBufferObject, discarding the old indices. Copying start at the
current | |
| unbind | back to summary |
|---|---|
| public void unbind() Implements com. Unbinds this IndexArray. | |
| updateIndices | back to summary |
|---|---|
| public void updateIndices(int targetOffset, short[] indices, int offset, int count) Implements com. Doc from com. Update (a portion of) the indices.
| |