VertexBufferObject

Buffer is a object oriented wrapper for a Vertex Buffer Object. VertexRenderer is public imported. See there for more details, like PointerTarget.

Constructors

this
this(Target trg, Type type)

CTor

Members

Enums

Access
enum Access

The access type.

Type
enum Type

Declare which Buffer Type is stored.

Functions

bind
void bind(Target trg)

Binds the a specific VBO PointerTarget. If the target is invalid (because no such buffer exist) nothing happens.

bindTexture
void bindTexture(Texture tex)

Bind a texture to this Buffer. It's a shortcut for:

cache
void cache(void* ptr, size_t totalSize, uint usage)

Stores data in the current VBO.

deplete
void deplete()

Reset the current buffer state

depleteAll
void depleteAll()

Reset all buffer states

disableAllStates
void disableAllStates()

Disable all client states

disableState
void disableState(Target trg)

Disable a specific client state (with glDisableClientState)

drawArrays
void drawArrays(Shape.Type ptype, size_t count, uint start)

Draw shapes of the specific type from the current VBO data. It will use count vertices.

drawElements
void drawElements(Shape.Type ptype, size_t count, uint[] indices)

Draw shapes of the specific type from the current VBO data. It will use count vertices and indices for the correct index per vertex.

drawRangeElements
void drawRangeElements(Shape.Type ptype, size_t count, uint[] indices, int start, int end)

Draw shapes of the specific type from the current VBO data. It will use count vertices and indices for the correct index per vertex.

enableAllStates
void enableAllStates()

Enable all client states

enableState
void enableState(Target trg)

Enable a specific client state (with glEnableClientState) like GL_VERTEX_ARRAY, GL_COLOR_ARRAY, GL_TEXTURE_COORD_ARRAY with the corresponding PointerTarget.

getBound
Target getBound()

Returns the current PointerTarget

isCurrentEmpty
bool isCurrentEmpty()

Checks whether the current buffer has already content, or not

isEmpty
bool isEmpty(Target trg)

Checks whether a specific buffer has already content, or not. If the target is invalid (because no such buffer exist) an Exception is thrown.

isSomethingBound
bool isSomethingBound()

Returns if some PointerTarget is currently bound

map
void* map(Access access)

The internal buffer memory is transferred to the memory of the client with a specific access. Before the buffer can be reused, <code>unmap</code> must be called.

modify
void modify(void* ptr, size_t totalSize, uint offset)

Modify existing buffer data

pointTo
void pointTo(Target trg, ubyte stride, ubyte offset)

Points to the current VBO with a specific PointerTarget.

unbind
void unbind()

Unbind the current VBO.

unmap
void unmap()

Allows other commands buffer access, in which it retrieves the memory from the client.

Variables

numTargets
ubyte numTargets;
Undocumented in source.
targets
Target targets;
Undocumented in source.
type
Type type;
Undocumented in source.

Meta

Authors

rschuett