|virtual ||~StelIndexBuffer ()|
| ||Virtual destructor. More...|
|void ||addIndex (const uint index)|
| ||Add a new index to the end of the buffer. More...|
|uint ||getIndex (const int which) const |
| ||Return index at specified position in the buffer. More...|
|void ||setIndex (const int which, const uint index)|
| ||Set specified index in the buffer. More...|
|void ||clear ()|
| ||Clear the buffer, removing all indices. More...|
|void ||lock ()|
| ||Lock the buffer. Must be called before drawing. More...|
|void ||unlock ()|
| ||Unlock the buffer. Must be called to modify the buffer after drawing. More...|
|bool ||locked () const |
| ||Is this buffer locked? More...|
|IndexType ||indexType () const |
| ||Get type of indices (16bit or 32bit) More...|
|int ||length () const |
| ||Returns the number of indices in the buffer. More...|
Generic index buffer interface usable with all Renderer backends.
Used to specify order in which vertices from a vertex buffer are drawn (allowing to e.g. draw the same vertex in multiple triangles without duplicating it, saving memory and RAM-VRAM bandwidth).
Definition at line 45 of file StelIndexBuffer.hpp.
Clear the buffer, removing all indices.
Can only be called when unlocked.
The backend might reuse previously allocated storage after clearing, so calling clear() might be more efficient than destroying a buffer and then constructing a new one.
Definition at line 106 of file StelIndexBuffer.hpp.