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 SubmitNodes and draw calls
from the RenderFeature’s WriteJob. The Renderer will combine all SubmitNodeBlocks 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> !Freeze for SubmitNodeBlock<SubmitPacketDataT>
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.