[][src]Macro glin::uniforms

macro_rules! uniforms {
    { $( $name:ident: $value:expr ),*  } => { ... };
    { $( $name:ident: $value:expr, )*  } => { ... };
    { $( $location:expr => $value:expr ),*  } => { ... };
    { $( $location:expr => $value:expr, )*  } => { ... };
}

easy way to set uniforms to pass a draw call

#[macro_use]
extern crate glin;
extern crate na;
fn main() {
    let projection: na::Mat4 = na::one();
    let view: na::Mat4 = na::one();
    let model: na::Mat4 = na::one();
    let uniforms = uniforms!{
        projection: projection,
        view: view,
        model: model,
        model_view_projection: projection * view * model,
    };
}