macro_rules! implement_uniform_block {
(__as_item $i:item) => { ... };
(__impl $struct_name:ident [$($gs:tt)*], $($field_name:ident),+) => { ... };
($struct_name:ident, $($field_name:ident),+,) => { ... };
($struct_name:ident, $($field_name:ident),+) => { ... };
($struct_name:ident<$l:tt>, $($field_name:ident),+) => { ... };
}Expand description
Implements the glium::uniforms::UniformBlock trait for the given type.
The parameters must be the name of the struct and the names of its fields.
ยงExample
#[derive(Copy, Clone)]
struct Vertex {
value1: [f32; 3],
value2: [f32; 2],
}
implement_uniform_block!(Vertex, value1, value2);