[][src]Macro wgpu::vertex_attr_array

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 ,)*) => { ... };
}

Macro to produce an array of [VertexAttributeDescriptor].

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

let attrs = vertex_attr_array![0 => Float2, 1 => Float, 2 => Ushort4];

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