pub struct SubmitNodeBlock<SubmitPacketDataT>where
SubmitPacketDataT: SubmitPacketData,{ /* private fields */ }
Expand description
The SubmitNodeBlock
is a collection of SubmitNode
associated with a particular RenderFeature
,
RenderView
, and RenderPhase
. There should be a 1:1 mapping between SubmitNode
s and draw calls
from the RenderFeature
’s WriteJob
. The Renderer
will combine all SubmitNodeBlock
s sharing the
same RenderView
and RenderPhase
into a sorted ViewPhaseSubmitNodeBlock
.
Implementations§
source§impl<SubmitPacketDataT> SubmitNodeBlock<SubmitPacketDataT>
impl<SubmitPacketDataT> SubmitNodeBlock<SubmitPacketDataT>
pub fn len(&self) -> usize
sourcepub fn with_capacity<RenderPhaseT>(
view: &RenderView,
num_submit_nodes: usize
) -> SubmitNodeBlock<SubmitPacketDataT>where
RenderPhaseT: RenderPhase,
pub fn with_capacity<RenderPhaseT>(
view: &RenderView,
num_submit_nodes: usize
) -> SubmitNodeBlock<SubmitPacketDataT>where
RenderPhaseT: RenderPhase,
Creates a SubmitNodeBlock
with a capacity of num_submit_nodes
if the RenderView
supports the RenderPhase
, otherwise the capacity will be set to 0
.
sourcepub fn with_capacity_and_feature_flag<RenderPhaseT, RenderFeatureFlagT>(
view: &RenderView,
num_submit_nodes: usize
) -> SubmitNodeBlock<SubmitPacketDataT>where
RenderPhaseT: RenderPhase,
RenderFeatureFlagT: RenderFeatureFlag,
pub fn with_capacity_and_feature_flag<RenderPhaseT, RenderFeatureFlagT>(
view: &RenderView,
num_submit_nodes: usize
) -> SubmitNodeBlock<SubmitPacketDataT>where
RenderPhaseT: RenderPhase,
RenderFeatureFlagT: RenderFeatureFlag,
Creates a SubmitNodeBlock
with a capacity of num_submit_nodes
if the RenderView
supports the RenderPhase
and RenderFeatureFlag
, otherwise the capacity will be set to 0
.
pub fn push_submit_node( &self, data: <SubmitPacketDataT as SubmitPacketData>::SubmitNodeData, sort_key: u32, distance: f32 ) -> u32
pub fn get_submit_node_data( &self, index: u32 ) -> &SubmitNode<<SubmitPacketDataT as SubmitPacketData>::SubmitNodeData>
pub fn is_relevant(&self, render_phase: u32) -> bool
Trait Implementations§
source§impl<SubmitPacketDataT> RenderFeatureSubmitNodeBlock for SubmitNodeBlock<SubmitPacketDataT>
impl<SubmitPacketDataT> RenderFeatureSubmitNodeBlock for SubmitNodeBlock<SubmitPacketDataT>
fn render_phase(&self) -> u32
fn num_submit_nodes(&self) -> usize
fn get_submit_node(&self, submit_node_id: u32) -> RenderFeatureSubmitNode
fn feature_index(&self) -> u32
Auto Trait Implementations§
impl<SubmitPacketDataT> !RefUnwindSafe for SubmitNodeBlock<SubmitPacketDataT>
impl<SubmitPacketDataT> Send for SubmitNodeBlock<SubmitPacketDataT>
impl<SubmitPacketDataT> Sync for SubmitNodeBlock<SubmitPacketDataT>
impl<SubmitPacketDataT> Unpin for SubmitNodeBlock<SubmitPacketDataT>
impl<SubmitPacketDataT> UnwindSafe for SubmitNodeBlock<SubmitPacketDataT>
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
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
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.