pub struct Mesh<'a> {
pub vertices: &'a [Vertex],
pub indices: &'a [u32],
pub texture: Option<TextureId>,
}Expand description
Triangles to draw with Frame::mesh.
Every three indices name one triangle’s vertices. The rasterizer reads the slices where they
lie for the duration of the call: nothing is copied, and nothing is kept afterwards.
Fields§
§vertices: &'a [Vertex]The vertices.
indices: &'a [u32]Vertex indices, three per triangle.
texture: Option<TextureId>The texture sampled at each vertex’s uv, or None to use the vertex colors alone.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Mesh<'a>
impl<'a> RefUnwindSafe for Mesh<'a>
impl<'a> Send for Mesh<'a>
impl<'a> Sync for Mesh<'a>
impl<'a> Unpin for Mesh<'a>
impl<'a> UnsafeUnpin for Mesh<'a>
impl<'a> UnwindSafe for Mesh<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more