Module rin::gl::attributes [−][src]
glsl attributes and utilities to represent them in vaos
Most of the time the elements in this module are only used internally since attributes are usually extracted from reading the available ones in glsl programs and using the glin_proc crate to anotate the vertex types being used rather than having to manually create any of the structs in this module.
VAO
in glin follow a model in which a buffer can be bound to one or more vertex binding points.
Then one or more attributes can read from a vertex binding point.
The binding of a buffer to a vertex binding point is represented by VertexBufferBinding
The relation between an attribute and a vertex binding point is represented by an
AttributeBufferBinding
which is a trait implemented by a tuple of a Format + the index of the
vertex buffer point.
A Format represents the format of the attribute and it’s offset in the vertex.
Structs
Format | Attribute format for most data types |
MatFormat | Attribute format for matrices |
VertexBufferBinding | Representation of a binding of a buffer to a vertex buffer binding point |
Enums
Type | OpenGL supported attribute types |
Traits
AttributeBufferBinding | Trait to implment gl::EnableVertexAttribArray or gl::VertexArrayAttribBinding |
Bindings | Attribute bindings in a program |
DynVertexBufferBinding | Representation of a vertex element as an attribute in a GL buffer |
VertexFormat | Implemented by vertex types to convert attribute bindings into attribute formats |