Facebook Twitter YouTube

class SharedVertexBuffer

Defined in:  TSRenderable.h
The SharedVertexBuffer class encapsulates a reference-counted vertex buffer.
Definition

class SharedVertexBuffer : public VertexBuffer

Member Functions
SharedVertexBuffer::Retain Retains a reference to a shared vertex buffer.
SharedVertexBuffer::Release Releases a reference to a shared vertex buffer.
Constructor

SharedVertexBuffer(unsigned_int32 flags);

Parameters
flags The vertex buffer flags. See the VertexBuffer class.
Description
The SharedVertexBuffer class is a vertex buffer that has a reference count so that it can safely be shared among multiple renderable objects. A shared vertex buffer is typically used when some vertex attribute or index data is identical for multiple instances of a renderable object of some kind.

When a shared vertex buffer object is first constructed, there are no references to it, and its reference count is zero. The SharedVertexBuffer::Retain function is used to add a new reference to the vertex buffer, and the SharedVertexBuffer::Release function is used to remove a reference. The Retain function is typically called in the constructor for some class, and the Release function is typically called in its destructor.
Base Classes
VertexBuffer A SharedVertexBuffer is a special type of vertex buffer.