pub enum RenderOp {
EnterClip {
instance_index: u32,
parent_ref: u8,
new_ref: u8,
},
DrawBatch(DrawBatch),
ExitClip {
instance_index: u32,
ref_value: u8,
},
}Expand description
One entry in a per-phase DFS render stream.
The overlay stream is a sequence of these ops that the renderer executes in order, binding different pipelines for stencil writes vs. clipped color draws.
Variants§
EnterClip
Write stencil INCR for a clip region entry.
Render instance_index’s mesh with pipeline_stencil_incr, stencil reference = parent_ref.
After this op, pixels under the mesh have stencil value new_ref.
DrawBatch(DrawBatch)
Draw a batch of instances.
batch.stencil_ref == 0 → use normal overlay pipeline.
batch.stencil_ref > 0 → use clipped overlay pipeline with that reference.
Instance indices live in [batch.start .. batch.start + batch.count) of the stream’s instance array.
ExitClip
Write stencil DECR to close a clip region.
Render instance_index’s mesh with pipeline_stencil_decr, stencil reference = ref_value.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RenderOp
impl RefUnwindSafe for RenderOp
impl Send for RenderOp
impl Sync for RenderOp
impl Unpin for RenderOp
impl UnsafeUnpin for RenderOp
impl UnwindSafe for RenderOp
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.