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§
Sourcefn draw(&mut self, context: &mut DrawContext<'_, '_, '_, T>)
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§
Sourcefn begin_frame(&mut self, context: &FrameContext<'_>)
fn begin_frame(&mut self, context: &FrameContext<'_>)
Prepares resources once per frame, before render passes.
Sourcefn end_frame(&mut self, context: &FrameContext<'_>)
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".