Macro glitter::attrib_pointers [] [src]

macro_rules! attrib_pointers {
    ($($field_name:ident => $field_attrib:expr),*) => { ... };
}

Create an AttribBinder from a set of associations from vertex attribute names to ProgramAttribs.

Examples

// Create an `AttribBinder`, where "position" and "color" are set
// to their respective program attributes.
let attribs = attrib_pointers! {
   position => gl.get_attrib_location(&program, "position").unwrap(),
   color => gl.get_attrib_location(&program, "color").unwrap()
};