pub struct SkyboxRendererPlugin;Trait Implementations§
Source§impl Default for SkyboxRendererPlugin
impl Default for SkyboxRendererPlugin
Source§fn default() -> SkyboxRendererPlugin
fn default() -> SkyboxRendererPlugin
Returns the “default value” for a type. Read more
Source§impl RenderFeaturePlugin for SkyboxRendererPlugin
impl RenderFeaturePlugin for SkyboxRendererPlugin
fn feature_debug_constants(&self) -> &'static RenderFeatureDebugConstants
fn feature_index(&self) -> RenderFeatureIndex
Source§fn is_view_relevant(&self, view: &RenderView) -> bool
fn is_view_relevant(&self, view: &RenderView) -> bool
Returns
true if the RenderView should be included in the FramePacket for this RenderFeature.
This is normally implemented by checking if the RenderView’s RenderPhaseMask includes the
RenderPhases needed by the RenderFeature.Source§fn requires_visible_render_objects(&self) -> bool
fn requires_visible_render_objects(&self) -> bool
Returns
true if this RenderFeature requires at least one RenderObject associated with this
RenderFeature in the RenderViewVisibilityQuery in order to include the RenderView in the
FramePacket for this RenderFeature. This is normally true if the RenderFeature defines
a RenderObjectSet and false otherwise.fn configure_render_registry( &self, render_registry: RenderRegistryBuilder, ) -> RenderRegistryBuilder
fn initialize_static_resources( &self, renderer_load_context: &RendererLoadContext, asset_manager: &mut AssetManager, asset_resource: &mut AssetResource, _extract_resources: &ExtractResources<'_>, render_resources: &mut RenderResources, _upload: &mut RafxTransferUpload, ) -> RafxResult<()>
Source§fn new_frame_packet(
&self,
frame_packet_size: &FramePacketSize,
) -> Box<dyn RenderFeatureFramePacket>
fn new_frame_packet( &self, frame_packet_size: &FramePacketSize, ) -> Box<dyn RenderFeatureFramePacket>
Allocates the memory for the
FramePacket.Source§fn new_extract_job<'extract>(
&self,
extract_context: &RenderJobExtractContext<'extract>,
frame_packet: Box<dyn RenderFeatureFramePacket>,
) -> Arc<dyn RenderFeatureExtractJob<'extract> + 'extract>
fn new_extract_job<'extract>( &self, extract_context: &RenderJobExtractContext<'extract>, frame_packet: Box<dyn RenderFeatureFramePacket>, ) -> Arc<dyn RenderFeatureExtractJob<'extract> + 'extract>
Returns a
RenderFeatureExtractJob wrapping the FramePacket.Source§fn new_submit_packet(
&self,
frame_packet: &Box<dyn RenderFeatureFramePacket>,
) -> Box<dyn RenderFeatureSubmitPacket>
fn new_submit_packet( &self, frame_packet: &Box<dyn RenderFeatureFramePacket>, ) -> Box<dyn RenderFeatureSubmitPacket>
Determines the size of the
SubmitPacket according to the size of the FramePacket and
allocates the memory for it. The SubmitPacket is populated by the RenderFeaturePrepareJob
so there is no equivalent to populate_frame_packet.Source§fn new_prepare_job<'prepare>(
&self,
prepare_context: &RenderJobPrepareContext<'prepare>,
frame_packet: Box<dyn RenderFeatureFramePacket>,
submit_packet: Box<dyn RenderFeatureSubmitPacket>,
) -> Arc<dyn RenderFeaturePrepareJob<'prepare> + 'prepare>
fn new_prepare_job<'prepare>( &self, prepare_context: &RenderJobPrepareContext<'prepare>, frame_packet: Box<dyn RenderFeatureFramePacket>, submit_packet: Box<dyn RenderFeatureSubmitPacket>, ) -> Arc<dyn RenderFeaturePrepareJob<'prepare> + 'prepare>
Returns a
RenderFeaturePrepareJob wrapping the FramePacket and SubmitPacket.Source§fn new_write_job<'write>(
&self,
write_context: &RenderJobWriteContext<'write>,
frame_packet: Box<dyn RenderFeatureFramePacket>,
submit_packet: Box<dyn RenderFeatureSubmitPacket>,
) -> Arc<dyn RenderFeatureWriteJob<'write> + 'write>
fn new_write_job<'write>( &self, write_context: &RenderJobWriteContext<'write>, frame_packet: Box<dyn RenderFeatureFramePacket>, submit_packet: Box<dyn RenderFeatureSubmitPacket>, ) -> Arc<dyn RenderFeatureWriteJob<'write> + 'write>
Returns a
RenderFeatureWriteJob wrapping the FramePacket and SubmitPacket.Source§fn is_relevant(&self, view_visibility: &RenderViewVisibilityQuery) -> bool
fn is_relevant(&self, view_visibility: &RenderViewVisibilityQuery) -> bool
Returns
true if the RenderView represented by the RenderViewVisibilityQuery should be
included in the FramePacket for this RenderFeature. Most features should only need to
implement is_view_relevant and requires_visible_render_objects.fn add_asset_paths(&self, _asset_paths: &mut Vec<PathBuf>)
fn prepare_renderer_destroy( &self, _render_resources: &ResourceMap, ) -> Result<(), RafxError>
fn add_render_views( &self, _extract_resources: &ResourceRefMap<'_>, _render_resources: &ResourceMap, _render_view_set: &RenderViewSet, _render_views: &mut Vec<RenderView>, )
Source§fn calculate_frame_packet_size<'extract>(
&self,
_extract_context: &RenderJobExtractContext<'extract>,
visibility_results: &Vec<RenderViewVisibilityQuery>,
render_object_instance_object_ids: &mut HashSet<RenderObjectInstance, BuildHasherDefault<FnvHasher>>,
frame_packet_size: &mut FramePacketSize,
)
fn calculate_frame_packet_size<'extract>( &self, _extract_context: &RenderJobExtractContext<'extract>, visibility_results: &Vec<RenderViewVisibilityQuery>, render_object_instance_object_ids: &mut HashSet<RenderObjectInstance, BuildHasherDefault<FnvHasher>>, frame_packet_size: &mut FramePacketSize, )
Determines the unique set of
RenderObjectInstances in FramePacket and the size of each
ViewPacket in the FramePacket.Source§fn populate_frame_packet<'extract>(
&self,
_extract_context: &RenderJobExtractContext<'extract>,
visibility_results: &Vec<RenderViewVisibilityQuery>,
_frame_packet_size: &FramePacketSize,
frame_packet: &mut Box<dyn RenderFeatureFramePacket>,
)
fn populate_frame_packet<'extract>( &self, _extract_context: &RenderJobExtractContext<'extract>, visibility_results: &Vec<RenderViewVisibilityQuery>, _frame_packet_size: &FramePacketSize, frame_packet: &mut Box<dyn RenderFeatureFramePacket>, )
Creates the mapping of
RenderObjectInstance and RenderObjectInstancePerView in the
FramePacket. This is done separately from new_frame_packet so that all of the frame
packets can be allocated at once and then populated in parallel.Auto Trait Implementations§
impl Freeze for SkyboxRendererPlugin
impl RefUnwindSafe for SkyboxRendererPlugin
impl Send for SkyboxRendererPlugin
impl Sync for SkyboxRendererPlugin
impl Unpin for SkyboxRendererPlugin
impl UnwindSafe for SkyboxRendererPlugin
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.