pub trait PrepareJobEntryPoints<'prepare>: Sync + Send + Sized {
    type RenderObjectInstanceJobContextT;
    type RenderObjectInstancePerViewJobContextT;
    type FramePacketDataT: 'static + Sync + Send + FramePacketData;
    type SubmitPacketDataT: 'static + Sync + Send + SubmitPacketData;

    // Required methods
    fn feature_debug_constants(&self) -> &'static RenderFeatureDebugConstants;
    fn feature_index(&self) -> u32;

    // Provided methods
    fn begin_per_frame_prepare(
        &self,
        _context: &PreparePerFrameContext<'prepare, '_, Self>
    ) { ... }
    fn prepare_render_object_instance(
        &self,
        _job_context: &mut Self::RenderObjectInstanceJobContextT,
        _context: &PrepareRenderObjectInstanceContext<'prepare, '_, Self>
    ) { ... }
    fn prepare_render_object_instance_per_view(
        &self,
        _job_context: &mut Self::RenderObjectInstancePerViewJobContextT,
        _context: &PrepareRenderObjectInstancePerViewContext<'prepare, '_, Self>
    ) { ... }
    fn end_per_view_prepare(
        &self,
        _context: &PreparePerViewContext<'prepare, '_, Self>
    ) { ... }
    fn end_per_frame_prepare(
        &self,
        _context: &PreparePerFrameContext<'prepare, '_, Self>
    ) { ... }
    fn new_render_object_instance_job_context(
        &'prepare self
    ) -> Option<Self::RenderObjectInstanceJobContextT> { ... }
    fn new_render_object_instance_per_view_job_context(
        &'prepare self
    ) -> Option<Self::RenderObjectInstancePerViewJobContextT> { ... }
}
Expand description

PrepareJobEntryPoints provides a generic set of callbacks for a RenderFeature compatible with the PrepareJob struct. This simplifies the work of implementing the RenderFeaturePrepareJob trait.

Required Associated Types§

source

type RenderObjectInstanceJobContextT

JobContext for the prepare_render_object_instance entry point.

source

type RenderObjectInstancePerViewJobContextT

JobContext for the prepare_render_object_instance_per_view entry point.

source

type FramePacketDataT: 'static + Sync + Send + FramePacketData

source

type SubmitPacketDataT: 'static + Sync + Send + SubmitPacketData

Required Methods§

Provided Methods§

source

fn begin_per_frame_prepare( &self, _context: &PreparePerFrameContext<'prepare, '_, Self> )

Called once at the start of the prepare step when any RenderView in the frame is relevant to this RenderFeature.

source

fn prepare_render_object_instance( &self, _job_context: &mut Self::RenderObjectInstanceJobContextT, _context: &PrepareRenderObjectInstanceContext<'prepare, '_, Self> )

Called once for each instance of an Entity and RenderObject in the frame matching this RenderFeature.

source

fn prepare_render_object_instance_per_view( &self, _job_context: &mut Self::RenderObjectInstancePerViewJobContextT, _context: &PrepareRenderObjectInstancePerViewContext<'prepare, '_, Self> )

Called once for each instance of an Entity and RenderObject in each RenderView relevant to this RenderFeature.

source

fn end_per_view_prepare( &self, _context: &PreparePerViewContext<'prepare, '_, Self> )

Called once for each relevant RenderView. This function is only run after all instances of prepare_render_object_instance_per_view have finished for that RenderView.

source

fn end_per_frame_prepare( &self, _context: &PreparePerFrameContext<'prepare, '_, Self> )

Called once at the end of the prepare step when any RenderView in the frame is relevant to this RenderFeature.

source

fn new_render_object_instance_job_context( &'prepare self ) -> Option<Self::RenderObjectInstanceJobContextT>

source

fn new_render_object_instance_per_view_job_context( &'prepare self ) -> Option<Self::RenderObjectInstancePerViewJobContextT>

Object Safety§

This trait is not object safe.

Implementors§