Skip to main content

Module vertex_format

Module vertex_format 

Source
Expand description

Mirrors wgpu::VertexFormat/VertexStepMode/VertexAttribute so a custom vertex struct’s layout (beyond the built-in Vertex/InstanceVertex) can be built with zero raw wgpu. Unlike wgpu::VertexBufferLayout (which borrows a 'static attribute slice), VertexBufferLayout owns its attributes — simpler to build, converted to wgpu’s borrowed shape internally by build_material in a scope that doesn’t need 'static.

Structs§

VertexAttribute
One vertex attribute within a VertexBufferLayout — mirrors wgpu::VertexAttribute.
VertexBufferLayout
Layout of one vertex buffer’s attributes — owns its attribute list (unlike wgpu::VertexBufferLayout, which borrows a 'static slice), so it can be built and passed around without lifetime ceremony.

Enums§

VertexFormat
Format of a single vertex attribute — mirrors wgpu::VertexFormat exactly (same variants, same names).
VertexStepMode
Whether a vertex buffer is indexed by vertex or by instance — mirrors wgpu::VertexStepMode.