Macro wgpu::vertex_attr_array[][src]

macro_rules! vertex_attr_array {
    ($($loc : expr => $fmt : ident), * $(,) ?) => { ... };
    ([$($t : expr,) *] ; $off : expr ;) => { ... };
    ([$($t : expr,) *] ; $off : expr ; $loc : expr => $item : ident,
 $($ll : expr => $ii : ident,) *) => { ... };
}
Expand description

Macro to produce an array of VertexAttribute.

Output has type: [VertexAttribute; _]. Usage is as follows:

let attrs = vertex_attr_array![0 => Float32x2, 1 => Float32, 2 => Uint16x4];

This example specifies a list of three VertexAttribute, each with the given shader_location and format. Offsets are calculated automatically.