Vao

A vertex attribute object.

This is a wrapper around a GLuint generated by glGenVertexArrays(1, &id). Initially, this id is 0. glGenVertexArrays is automatically called the first time bind() is called.

Destructor

~this
~this()

Destroy the OpenGL Vao and reset the id back to 0. (Calls glDeleteVertexArrays.)

Postblit

this(this)
this(this)
Undocumented in source.

Members

Functions

bind
void bind()

Create the OpenGL Vao, if needed, and bind it. (Calls glBindVertexArray.)

create
void create()

Force the creation of a OpenGL Vao, or do nothing if already created. (Calls glGenVertexArrays.)

destroy
void destroy()

Destroy the OpenGL Vao and reset the id back to 0. (Calls glDeleteVertexArrays.)

disableAttribute
void disableAttribute(GLuint index)

Disable an attribute. (Calls glDisableVertexAttribArray.)

opCast
bool opCast()

Check if this Vao is already created in OpenGL.

setAttribute
void setAttribute(GLuint index, GenericVbo vbo, AttributeParameters parameters)
void setAttribute(GLuint index, SpecificVbo!(T) vbo)

Add or change an attribute. (Calls glEnableVertexAttribArray and glVertexAttribPointer.)

Properties

created
bool created [@property getter]

Check if this Vao is already created in OpenGL.

id
GLuint id [@property getter]

The id of this Vao, or 0 if it is not yet created in OpenGL.

Meta