Struct rafx_framework::render_features::SubmitNodeBlock
source · pub struct SubmitNodeBlock<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: 'static + Sync + Send + SubmitPacketData> SubmitNodeBlock<SubmitPacketDataT>
impl<SubmitPacketDataT: 'static + Sync + Send + SubmitPacketData> SubmitNodeBlock<SubmitPacketDataT>
pub fn len(&self) -> usize
sourcepub fn with_capacity<RenderPhaseT: RenderPhase>(
view: &RenderView,
num_submit_nodes: usize
) -> Self
pub fn with_capacity<RenderPhaseT: RenderPhase>( view: &RenderView, num_submit_nodes: usize ) -> Self
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: RenderPhase, RenderFeatureFlagT: RenderFeatureFlag>(
view: &RenderView,
num_submit_nodes: usize
) -> Self
pub fn with_capacity_and_feature_flag<RenderPhaseT: RenderPhase, RenderFeatureFlagT: RenderFeatureFlag>( view: &RenderView, num_submit_nodes: usize ) -> Self
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::SubmitNodeData, sort_key: SubmitNodeSortKey, distance: f32 ) -> SubmitNodeId
pub fn get_submit_node_data( &self, index: SubmitNodeId ) -> &SubmitNode<SubmitPacketDataT::SubmitNodeData>
pub fn is_relevant(&self, render_phase: RenderPhaseIndex) -> bool
Trait Implementations§
source§impl<SubmitPacketDataT: 'static + Sync + Send + SubmitPacketData> RenderFeatureSubmitNodeBlock for SubmitNodeBlock<SubmitPacketDataT>
impl<SubmitPacketDataT: 'static + Sync + Send + SubmitPacketData> RenderFeatureSubmitNodeBlock for SubmitNodeBlock<SubmitPacketDataT>
fn render_phase(&self) -> RenderPhaseIndex
fn num_submit_nodes(&self) -> usize
fn get_submit_node( &self, submit_node_id: SubmitNodeId ) -> RenderFeatureSubmitNode
fn feature_index(&self) -> RenderFeatureIndex
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
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>
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
.source§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
.source§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.source§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.