pub struct DepthQueue { /* private fields */ }Expand description
Deferred depth-sorted draw queue.
Implementations§
Source§impl DepthQueue
impl DepthQueue
Sourcepub fn push_triangle(
&mut self,
depth: f32,
color: u32,
x0: f32,
y0: f32,
x1: f32,
y1: f32,
x2: f32,
y2: f32,
)
pub fn push_triangle( &mut self, depth: f32, color: u32, x0: f32, y0: f32, x1: f32, y1: f32, x2: f32, y2: f32, )
Queue a filled triangle.
Sourcepub fn push_triangle_g(
&mut self,
depth: f32,
x0: f32,
y0: f32,
c0: u32,
x1: f32,
y1: f32,
c1: u32,
x2: f32,
y2: f32,
c2: u32,
bands: u32,
)
pub fn push_triangle_g( &mut self, depth: f32, x0: f32, y0: f32, c0: u32, x1: f32, y1: f32, c1: u32, x2: f32, y2: f32, c2: u32, bands: u32, )
Queue a Gouraud + posterised triangle (smooth cel).
Sourcepub fn push_line(
&mut self,
depth: f32,
color: u32,
x0: f32,
y0: f32,
x1: f32,
y1: f32,
)
pub fn push_line( &mut self, depth: f32, color: u32, x0: f32, y0: f32, x1: f32, y1: f32, )
Queue a line segment.
Sourcepub fn flush(self, buf: &mut Vec<u32>, width: usize, height: usize)
pub fn flush(self, buf: &mut Vec<u32>, width: usize, height: usize)
Sort back-to-front and rasterise everything into buf.
Consumes self — call site does mem::take to avoid borrow conflict.
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Debug for DepthQueue
impl Debug for DepthQueue
Source§impl Default for DepthQueue
impl Default for DepthQueue
Source§fn default() -> DepthQueue
fn default() -> DepthQueue
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DepthQueue
impl RefUnwindSafe for DepthQueue
impl Send for DepthQueue
impl Sync for DepthQueue
impl Unpin for DepthQueue
impl UnsafeUnpin for DepthQueue
impl UnwindSafe for DepthQueue
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
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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