This reference page is linked to from the following overview topics: Low-level Device API.
#include <IndexBufferHandle.h>
IndexBufferHandle is a memory buffer that contain index data.
Index data, or indices, are integer offsets into vertex buffers and are used to render primitives.
Public Member Functions |
|
GraphicsDriverAPI | IndexBufferHandle () |
GraphicsDriverAPI | IndexBufferHandle (const IndexBufferHandle &from) |
GraphicsDriverAPI IndexBufferHandle & |
operator= (const IndexBufferHandle &from) |
virtual GraphicsDriverAPI | ~IndexBufferHandle () |
GraphicsDriverAPI bool | Initialize (IndexType type) |
Initialize the index buffer. |
|
GraphicsDriverAPI IndexType | GetType () const |
Get the type of the index buffer. |
|
GraphicsDriverAPI size_t | GetNumberOfIndices () const |
Get the number of indices of this buffer.
|
|
GraphicsDriverAPI void | SetNumberOfIndices (size_t numberOfIndices) |
Set the number of indices of this buffer.
|
|
GraphicsDriverAPI unsigned char * | Lock (size_t index, size_t numberOfIndices, AccessType accessType) |
This function is used for reading/writing
data from/into the index buffer. |
|
GraphicsDriverAPI void | Unlock () |
Unlock the buffer to update. |
GraphicsDriverAPI IndexBufferHandle | ( | ) |
GraphicsDriverAPI IndexBufferHandle | ( | const IndexBufferHandle & | from | ) |
virtual GraphicsDriverAPI ~IndexBufferHandle | ( | ) | [virtual] |
GraphicsDriverAPI IndexBufferHandle& operator= | ( | const IndexBufferHandle & | from | ) |
GraphicsDriverAPI bool Initialize | ( | IndexType | type | ) |
Initialize the index buffer.
type | The type of the newly created buffer. |
GraphicsDriverAPI IndexType GetType | ( | ) | const |
Get the type of the index buffer.
GraphicsDriverAPI size_t GetNumberOfIndices | ( | ) | const |
GraphicsDriverAPI void SetNumberOfIndices | ( | size_t | numberOfIndices | ) |
Set the number of indices of this buffer.
numberOfIndices | The size of the buffer |
GraphicsDriverAPI unsigned char* Lock | ( | size_t | index, |
size_t | numberOfIndices, | ||
AccessType | accessType | ||
) |
This function is used for reading/writing data from/into the index buffer.
index | the start index that the lock operation starts |
numberOfIndices | the number of indices that this function will lock. |
accessType | indicate how to operate on the buffer. |
GraphicsDriverAPI void Unlock | ( | ) |
Unlock the buffer to update.
This function must be called after Lock. Once this function is called, the buffer that returned by Lock become invalid and should not be used any more.