Facebook Twitter YouTube

class VertexBuffer

Defined in:  TSRenderable.h
The VertexBuffer class encapsulates a buffer that stores GPU-accessible vertex data.
Definition

class VertexBuffer : public Render::VertexBufferObject, public ListElement<VertexBuffer>

Member Functions
VertexBuffer::EstablishVertexBuffer Establishes the size of a vertex buffer and initializes it.
VertexBuffer::VertexBufferActive Returns a boolean value indicating whether a vertex buffer is active.
VertexBuffer::GetVertexBufferSize Returns the size of a vertex buffer.
VertexBuffer::GetVertexStride Returns the vertex stride for a vertex buffer.
VertexBuffer::BeginUpdate Maps a vertex buffer and returns a pointer to its storage.
VertexBuffer::EndUpdate Unmaps a vertex buffer.
VertexBuffer::UpdateBuffer Copies data to a vertex buffer.
Constructor

VertexBuffer(unsigned_int32 flags);

Parameters
flags The vertex buffer flags.
Description
The VertexBuffer class encapsulates a buffer that stores GPU-accessible vertex attribute data or vertex index data. The flags parameter should be a combination of the following constants specifying which kind of data will be stored in the vertex buffer and how the vertex buffer will be used.
kVertexBufferAttribute The vertex buffer contains vertex attribute data.
kVertexBufferIndex The vertex buffer contains vertex index data.
kVertexBufferStatic The vertex buffer data is static and will be written only once.
kVertexBufferDynamic The vertex buffer data is dynamic and will be written multiple times.
The flags parameter should be set to the logical OR of exactly two values from this table. The first value must be either kVertexBufferAttribute or kVertexBufferIndex, and the second value must be either kVertexBufferStatic or kVertexBufferDynamic.
Base Classes
Render::VertexBufferObject Used internally by the Graphics Manager.
ListElement<VertexBuffer> Used internally by the Graphics Manager.
See Also

SharedVertexBuffer

Renderable::SetVertexBuffer