#include <VertexBufferManager.h>
CVertexBuffer::VBChunk * CVertexBufferManager::Allocate |
( |
size_t |
vertexSize, |
|
|
size_t |
numVertices, |
|
|
GLenum |
usage, |
|
|
GLenum |
target, |
|
|
void * |
backingStore = NULL |
|
) |
| |
Try to allocate a vertex buffer of the given size and type.
- Parameters
-
vertexSize | size of each vertex in the buffer |
numVertices | number of vertices in the buffer |
usage | GL_STATIC_DRAW, GL_DYNAMIC_DRAW, GL_STREAM_DRAW |
target | typically GL_ARRAY_BUFFER or GL_ELEMENT_ARRAY_BUFFER |
backingStore | if usage is STATIC, this is NULL; else for DYNAMIC/STREAM, this must be a copy of the vertex data that remains valid for the lifetime of the VBChunk |
- Returns
- chunk, or NULL if no free chunks available
const std::list<CVertexBuffer*>& CVertexBufferManager::GetBufferList |
( |
| ) |
const |
|
inline |
Returns a list of all buffers.
size_t CVertexBufferManager::GetBytesAllocated |
( |
| ) |
|
size_t CVertexBufferManager::GetBytesReserved |
( |
| ) |
|
Returns the given chunk
to its owning buffer.
void CVertexBufferManager::Shutdown |
( |
void |
| ) |
|
Explicit shutdown of the vertex buffer subsystem; releases all currently-allocated buffers.
List of all known vertex buffers.
The documentation for this class was generated from the following files: