Skip to main content

DrawablePipeline

Trait DrawablePipeline 

Source
pub trait DrawablePipeline<T: DrawCommand> {
    // Required method
    fn draw(&mut self, context: &mut DrawContext<'_, '_, '_, T>);

    // Provided methods
    fn begin_frame(&mut self, context: &FrameContext<'_>) { ... }
    fn end_frame(&mut self, context: &FrameContext<'_>) { ... }
}
Expand description

Draws commands of type T.

Each frame calls begin_frame, then draw for each batch; end_frame runs after all passes and before submission.

Required Methods§

Source

fn draw(&mut self, context: &mut DrawContext<'_, '_, '_, T>)

Renders the command batch. Honor clip_rect when setting scissor bounds. The scene texture is available for commands that declare background sampling.

Provided Methods§

Source

fn begin_frame(&mut self, context: &FrameContext<'_>)

Prepares resources once per frame, before render passes.

Source

fn end_frame(&mut self, context: &FrameContext<'_>)

Finalizes the frame after all passes and before GPU submission.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§