This class is our hw index buffer representation.
This class is our hw index buffer representation. It is just basically a list of DWORDs or WORDs and a description of the number of indices per element.
#include <HWIndex.h>
Public Member Functions |
|
DllExport | HWIndexBuffer (unsigned int count, unsigned int indicesPerPrimitive, bool use16Bit) |
Constructor. |
|
DllExport | ~HWIndexBuffer () |
Destructor. |
|
DllExport void | FreeBuffer () |
This frees all our index buffers. |
|
DllExport const unsigned int | NumberPrimitives () |
returns the number of primitives in the
index buffer |
|
DllExport const unsigned int | IndicesPerPrimitive () |
Returns the number of indices per primitive.
|
|
*DllExport const unsigned int | Size () |
The size of the buffer in bytes. |
|
DllExport bool | SetNumberPrimitives (unsigned int ct) |
This lets you reset the number of
primitives. |
|
DllExport bool | Is16Bit () |
This returns whether the buffers are 16 or
32 bit. |
|
DllExport HWIndex32Bit | GetHWIndex32Bit (int index) |
Returns a particular 32 bit HWIndex.
|
|
DllExport HWIndex16Bit | GetHWIndex16Bit (int index) |
Returns a particular 16 bit HWIndex.
|
|
DllExport const DWORD * | GetRawBufferPointer () |
Returns the raw pointer to the 32 but
buffer. |
|
DllExport const WORD * | GetRawBufferPointer16Bit () |
Returns the raw pointer to the 16 bit
buffer. |
DllExport HWIndexBuffer | ( | unsigned int | count, |
unsigned int | indicesPerPrimitive, | ||
bool | use16Bit | ||
) |
Constructor.
HWIndexBuffer(unsigned int count, unsigned int
indicesPerPrimitive, bool use16Bit) Constructor
count | - this is the number of primitives for this buffer to be
allocated |
indicesPerPrimitive | - this is the number of indices per primitive |
use16Bit | - this is whether to use 16 bit buffers for the
indices |
DllExport ~HWIndexBuffer | ( | ) |
Destructor.
DllExport void FreeBuffer | ( | ) |
This frees all our index buffers.
This frees all our index buffers and resets the count to 0
DllExport const unsigned int NumberPrimitives | ( | ) |
returns the number of primitives in the index buffer
DllExport const unsigned int IndicesPerPrimitive | ( | ) |
Returns the number of indices per primitive.
* DllExport const unsigned int Size | ( | ) |
The size of the buffer in bytes.
DllExport bool SetNumberPrimitives | ( | unsigned int | ct | ) |
This lets you reset the number of primitives.
This lets you reset the number of primitives in the list it will keep the original data. It will returns true if successful.
ct | is the new size for the buffer |
DllExport bool Is16Bit | ( | ) |
This returns whether the buffers are 16 or 32 bit.
DllExport HWIndex32Bit GetHWIndex32Bit | ( | int | index | ) |
Returns a particular 32 bit HWIndex.
Returns a particular 32 bit HWIndex. This is useful if you dont want to look up the offsets by hand /param int index - the index of that you want
DllExport HWIndex16Bit GetHWIndex16Bit | ( | int | index | ) |
Returns a particular 16 bit HWIndex.
Returns a particular 16 bit HWIndex. This is useful if you dont want to look up the offsets by hand /param int index - the index of that you want
DllExport const DWORD* GetRawBufferPointer | ( | ) |
Returns the raw pointer to the 32 but buffer.
DllExport const WORD* GetRawBufferPointer16Bit | ( | ) |
Returns the raw pointer to the 16 bit buffer.