Vertices

Manages an OpenGL vertex array object (Vao).

Keeps track of attributes of Vertices stored inside Buffers.

Members

Classes

Attribute
class Attribute

A vertex attribute.

Functions

attribute
auto attribute(string name, string file, size_t line)
auto attribute(GLuint index, string file, size_t line)

Gives you the vertex Attribute with the given name or index.

bind
void bind()

Bind the Vao. (Calls vao.bind().)

hasAttribute
auto hasAttribute(string name)
auto hasAttribute(GLuint index)

Gives you a pointer to the Attribute with the given name or index, or null if it doesn't exist.

setAttribute
Attribute setAttribute(string name, GenericBuffer buffer, AttributeParameters parameters)
Attribute setAttribute(string name, Buffer!T buffer)

Add or change an attribute.

setAttributes
void setAttributes(Buffer!T buffer)
void setAttributes(Buffer!T buffer, string[string] names)

Automatically calls setAttribute for each member of the struct T.

Properties

attributes
auto attributes [@property getter]

The attributes of the Vertices.

enabledAttributes
auto enabledAttributes [@property getter]

The attributes that are enabled.

vao
auto ref vao [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Meta