Module glitter::vertex_data [] [src]

Contains types related to vertex data, which are used for VertexBuffers.

Structs

VertexAttribute

Specifies the type, name, and memory layout of a vertex attribute. Generally, a "vertex attribute" corresponds to a field in a VertexData struct.

VertexAttributeType

Used to specify type of a vertex attribute. The size of the vertex attribute is size_of(data) * components.

Traits

VertexBytes

Indicates that a type can be coerced to a u8 slice that can then be treated as a stream of vertex data.

VertexData

A type that has vertex data.

VertexDatum

A single value that can be treated as a part of a vertex. Implementors should map to a GLSL primitive that can be used as a vertex attribute. For example, [f32; 2] corresponds to vec2 in memory layout and structure.

VertexPrimitive

A single, basic value that can be composed to make a VertexDatum. Scalar values are an example of a VertexPrimitive.