Struct gfx::render::mesh::Mesh
[−]
[src]
pub struct Mesh<R: Resources> { pub num_vertices: VertexCount, pub attributes: Vec<Attribute<R>>, }
Describes geometry to render.
Fields
num_vertices | Number of vertices in the mesh. |
attributes | Vertex attributes to use. |
Methods
impl<R: Resources> Mesh<R>
fn new(nv: VertexCount) -> Mesh<R>
Create a new mesh, which is a TriangleList
with no attributes and nv
vertices.
fn from_format<V: VertexFormat>(buf: Buffer<R, V>, nv: VertexCount) -> Mesh<R>
Create a new Mesh
from a struct that implements VertexFormat
and a buffer.
fn from_format_instanced<V: VertexFormat, U: VertexFormat>(buf: Buffer<R, V>, nv: VertexCount, inst: Buffer<R, U>) -> Mesh<R>
Create a new intanced Mesh
given a vertex buffer and an instance buffer.