macro_rules! mesh {
($display: expr, $indices: expr, $( $x: expr ),*) => { ... };
}
Expand description
create a triangle mesh from a Display
, u32
indices followed by anything that can be stored
in a vertex buffer e.g Vertex
and/or TextureCoords
.
if an error occurs it returns the MeshError
enum
use glium_types::{mesh, teapot};
let (indices, vertices, normals) = mesh!(
&display, &teapot::INDICES, &teapot::VERTICES, &teapot::NORMALS
).unwrap();