public class IndexBuffer extends GraphicsResource
_parent, Disposing, Name, Tag
Constructor and Description |
---|
IndexBuffer(GraphicsDevice graphicsDevice,
java.lang.Class indexType,
int indexCount,
BufferUsage usage)
Initializes a new instance of the IndexBuffer class.
|
IndexBuffer(GraphicsDevice graphicsDevice,
IndexElementSize indexElementSize,
int indexCount,
BufferUsage usage)
Initializes a new instance of the IndexBuffer class.
|
Modifier and Type | Method and Description |
---|---|
protected void |
Dispose(boolean disposing)
Immediately releases the unmanaged resources used by this object.
|
BufferUsage |
getBufferUsage()
Gets the state of the related BufferUsage enumeration.
|
<T> void |
GetData(int offsetInBytes,
T[] data,
int startIndex,
int elementCount)
Gets a copy of the index buffer data, specifying the start index, starting offset, number of elements, and size of the elements.
|
<T> void |
GetData(T[] data)
Gets a copy of the index buffer data.
|
<T> void |
GetData(T[] data,
int startIndex,
int elementCount)
Gets a copy of the index buffer data, specifying the start index and number of elements.
|
int |
getIndexCount()
Gets the number of indices in this buffer.
|
IndexElementSize |
getIndexElementSize()
Gets a value indicating the size of this index element.
|
<T> void |
SetData(int offsetInBytes,
T[] data,
int startIndex,
int elementCount)
Sets index buffer data, specifying the offset, start index and number of elements.
|
<T> void |
SetData(T[] data)
Sets index buffer data.
|
<T> void |
SetData(T[] data,
int startIndex,
int elementCount)
Sets index buffer data, specifying the start index and number of elements.
|
Dispose, finalize, getGraphicsDevice, IsDisposed, raise_disposing, toString
public IndexBuffer(GraphicsDevice graphicsDevice, IndexElementSize indexElementSize, int indexCount, BufferUsage usage)
graphicsDevice
- The GraphicsDevice object to associate with the index buffer.indexElementSize
- The size (in bits) of each index.indexCount
- The number of indices.usage
- Behavior options.public IndexBuffer(GraphicsDevice graphicsDevice, java.lang.Class indexType, int indexCount, BufferUsage usage)
graphicsDevice
- The GraphicsDevice object to associate with the index buffer.indexType
- The index value type.indexCount
- The number of indices.usage
- Behavior options.public BufferUsage getBufferUsage()
public int getIndexCount()
public IndexElementSize getIndexElementSize()
protected void Dispose(boolean disposing)
Dispose
in class GraphicsResource
disposing
- true to release both managed and unmanaged resources; false to release only unmanaged resources.public <T> void GetData(int offsetInBytes, T[] data, int startIndex, int elementCount)
offsetInBytes
- Offset in bytes from the beginning of the buffer to the data.data
- Array of data.startIndex
- Index of the first element to get.elementCount
- Number of elements to get.public <T> void GetData(T[] data)
data
- Array of data.public <T> void GetData(T[] data, int startIndex, int elementCount)
data
- Array of data.startIndex
- Index of the first element to get.elementCount
- Number of elements to get.public <T> void SetData(int offsetInBytes, T[] data, int startIndex, int elementCount)
offsetInBytes
- Offset in bytes from the beginning of the buffer to the data.data
- Array of data.startIndex
- Index of the first element to set.elementCount
- Number of elements to set.public <T> void SetData(T[] data)
data
- Array of data.public <T> void SetData(T[] data, int startIndex, int elementCount)
data
- Array of data.startIndex
- Index of the first element to set.elementCount
- Number of elements to set.