pub struct Buffer { /* private fields */ }
Expand description
Buffer is used for customizing how is the vertex data processed
Implementations§
Source§impl Buffer
impl Buffer
pub fn no_texture() -> Self
Sourcepub fn set_vertices(&self, vertices: &[f32])
pub fn set_vertices(&self, vertices: &[f32])
set_vertices sets vertices and adds default indices so you can draw
Sourcepub fn set_vertices_and_indices(&self, vertices: &[f32], indices: &[u32])
pub fn set_vertices_and_indices(&self, vertices: &[f32], indices: &[u32])
set_vertices_and_indices sets vertices and custom indices
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Buffer
impl RefUnwindSafe for Buffer
impl Send for Buffer
impl Sync for Buffer
impl Unpin for Buffer
impl UnwindSafe for Buffer
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
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