CVertexBuffer: encapsulation of ARB_vertex_buffer_object, also supplying some additional functionality for sharing buffers between multiple objects.
More...
#include <VertexBuffer.h>
|
static void | Unbind () |
| Unbind any currently-bound buffer, so glVertexPointer etc calls will not attempt to use it. More...
|
|
|
VBChunk * | Allocate (size_t vertexSize, size_t numVertices, GLenum usage, GLenum target) |
| Try to allocate a buffer of given number of vertices (each of given size), and with the given type - return null if no free chunks available. More...
|
|
void | Release (VBChunk *chunk) |
| Return given chunk to this buffer. More...
|
|
CVertexBuffer: encapsulation of ARB_vertex_buffer_object, also supplying some additional functionality for sharing buffers between multiple objects.
Definition at line 40 of file VertexBuffer.h.
CVertexBuffer::CVertexBuffer |
( |
size_t |
vertexSize, |
|
|
GLenum |
usage, |
|
|
GLenum |
target |
|
) |
| |
CVertexBuffer::~CVertexBuffer |
( |
| ) |
|
CVertexBuffer::VBChunk * CVertexBuffer::Allocate |
( |
size_t |
vertexSize, |
|
|
size_t |
numVertices, |
|
|
GLenum |
usage, |
|
|
GLenum |
target |
|
) |
| |
|
protected |
Try to allocate a buffer of given number of vertices (each of given size), and with the given type - return null if no free chunks available.
Definition at line 93 of file VertexBuffer.cpp.
u8 * CVertexBuffer::Bind |
( |
| ) |
|
Bind to this buffer; return pointer to address required as parameter to glVertexPointer ( + etc) calls.
Definition at line 197 of file VertexBuffer.cpp.
bool CVertexBuffer::CompatibleVertexType |
( |
size_t |
vertexSize, |
|
|
GLenum |
usage, |
|
|
GLenum |
target |
|
) |
| |
Returns true if this vertex buffer is compatible with the specified vertex type and intended usage.
Definition at line 81 of file VertexBuffer.cpp.
void CVertexBuffer::DumpStatus |
( |
| ) |
|
u8 * CVertexBuffer::GetBindAddress |
( |
| ) |
|
size_t CVertexBuffer::GetBytesAllocated |
( |
| ) |
const |
size_t CVertexBuffer::GetBytesReserved |
( |
| ) |
const |
size_t CVertexBuffer::GetVertexSize |
( |
| ) |
const |
|
inline |
void CVertexBuffer::Release |
( |
VBChunk * |
chunk | ) |
|
|
protected |
void CVertexBuffer::Unbind |
( |
| ) |
|
|
static |
Unbind any currently-bound buffer, so glVertexPointer etc calls will not attempt to use it.
Definition at line 218 of file VertexBuffer.cpp.
void CVertexBuffer::UpdateChunkVertices |
( |
VBChunk * |
chunk, |
|
|
void * |
data |
|
) |
| |
Update vertex data for given chunk. Transfers the provided data to the actual OpenGL vertex buffer.
Definition at line 178 of file VertexBuffer.cpp.
std::list<VBChunk*> CVertexBuffer::m_FreeList |
|
private |
size_t CVertexBuffer::m_FreeVertices |
|
private |
Available free vertices - total of all free vertices in the free list.
Definition at line 109 of file VertexBuffer.h.
GLuint CVertexBuffer::m_Handle |
|
private |
Handle to the actual GL vertex buffer object.
Definition at line 111 of file VertexBuffer.h.
size_t CVertexBuffer::m_MaxVertices |
|
private |
Number of vertices of above size in this buffer.
Definition at line 105 of file VertexBuffer.h.
u8* CVertexBuffer::m_SysMem |
|
private |
Raw system memory for systems not supporting VBOs.
Definition at line 113 of file VertexBuffer.h.
GLenum CVertexBuffer::m_Target |
|
private |
Buffer target (GL_ARRAY_BUFFER, GL_ELEMENT_ARRAY_BUFFER)
Definition at line 117 of file VertexBuffer.h.
GLenum CVertexBuffer::m_Usage |
|
private |
Usage type of the buffer (GL_STATIC_DRAW etc)
Definition at line 115 of file VertexBuffer.h.
size_t CVertexBuffer::m_VertexSize |
|
private |
The documentation for this class was generated from the following files: