pub enum DrawRange {
Vertices {
vertices: Range<u32>,
instances: Range<u32>,
},
Indexed {
indices: Range<u32>,
base_vertex: i32,
instances: Range<u32>,
},
}Expand description
What to draw for one mesh.
Variants§
Vertices
Draw vertices without an index buffer, instanced over instances.
Indexed
Draw indexed, instanced over instances.
Implementations§
Source§impl DrawRange
impl DrawRange
Sourcepub fn with_instances(self, instances: Range<u32>) -> Self
pub fn with_instances(self, instances: Range<u32>) -> Self
Draw count instances instead of one.
Sourcepub fn with_base_vertex(self, base_vertex: i32) -> Self
pub fn with_base_vertex(self, base_vertex: i32) -> Self
Offset every fetched vertex index by base_vertex (indexed draws
only; a no-op for non-indexed draws).
Trait Implementations§
Auto Trait Implementations§
impl Forget for DrawRange
impl Freeze for DrawRange
impl RefUnwindSafe for DrawRange
impl Send for DrawRange
impl Sync for DrawRange
impl Unpin for DrawRange
impl UnsafeUnpin for DrawRange
impl UnwindSafe for DrawRange
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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