VBO

Represents an OpenGL VBO.

Constructors

this
this(GLenum type)

Create a new VBO with the specified type. (glGenBuffers)

Members

Functions

bind
void bind()

Binds the buffer for OpenGL use.

cleanup
void cleanup()

Frees resources used by the buffer (deletes it).

setData
void setData(float[] data, GLenum usage)

Set the data of the buffer. Uses glBufferData.

setData
void setData(uint[] data, GLenum usage)

Set the data of the buffer. Uses glBufferData.

setDataRaw
void setDataRaw(GLvoid* data, GLsizei length, GLenum usage)

Sets the data of the buffer (raw).

setSubData
void setSubData(GLvoid* data, GLintptr offset, GLsizei length)
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

type
GLenum type [@property getter]

The VBO Type, ex. GL_ARRAY_BUFFER.

vbo
GLuint vbo [@property getter]

The VBO's GLuint id.

Meta