Module buffer

Source
Expand description

Vertex buffer with dynamic layout. See VertexBuffer docs for more info and usage examples.

Structs§

AttributeViewRef
A typed attribute view for a specific vertex attribute in a vertex buffer.
AttributeViewRefMut
A typed attribute view for a specific vertex attribute in a vertex buffer.
BytesStorage
Bytes storage of a vertex buffer.
TriangleBuffer
A buffer for data that defines connections between vertices.
TriangleBufferRefMut
See VertexBuffer::modify for more info.
VertexAttribute
Vertex attribute is a simple “bridge” between raw data and its interpretation. In other words it defines how to treat raw data in vertex shader.
VertexAttributeDescriptor
Input vertex attribute descriptor used to construct layouts and feed vertex buffer.
VertexBuffer
Vertex buffer with dynamic layout. It is used to store multiple vertices of a single type, that implements VertexTrait. Different vertex types used to for efficient memory usage. For example, you could have a simple vertex with only position expressed as Vector3 and it will be enough for simple cases, when only position is required. However, if you want to draw a mesh with skeletal animation, that also supports texturing, lighting, you need to provide a lot more data (bone indices, bone weights, normals, tangents, texture coordinates).
VertexBufferRefMut
See VertexBuffer::modify for more info.
VertexViewMut
Read/write accessor for a vertex with some layout.
VertexViewRef
Read accessor for a vertex with some layout.

Enums§

ValidationError
An error that may occur during input data and layout validation.
VertexAttributeDataType
Data type for a vertex attribute component.
VertexAttributeUsage
An usage for vertex attribute. It is a fixed set, but there are plenty room for any custom data - it may be fit into TexCoordN attributes.
VertexFetchError
An error that may occur during fetching using vertex read/write accessor.

Traits§

VertexReadTrait
A trait for read-only vertex data accessor.
VertexTrait
A common trait for all vertex types. IMPORTANT: Implementors must use #[repr(C)] attribute, otherwise the compiler is free to reorder fields and you might get weird results, because definition order will be different from memory order! See examples in VertexBuffer docs.
VertexWriteTrait
A trait for read/write vertex data accessor.