Skip to main content

RenderPass

Trait RenderPass 

Source
pub trait RenderPass:
    Send
    + Sync
    + 'static {
    // Required method
    fn name(&self) -> &str;

    // Provided method
    fn execute(
        &self,
        _device: &Device,
        _queue: &Queue,
        _pass: &mut RenderPass<'_>,
    ) { ... }
}
Expand description

trait for custom render passes that can be executed by the render engine.

implement this trait to add custom rendering (e.g. post-processing, 3D passes). passes are executed in registration order after the default 2D pass.

Required Methods§

Source

fn name(&self) -> &str

unique name for this pass.

Provided Methods§

Source

fn execute(&self, _device: &Device, _queue: &Queue, _pass: &mut RenderPass<'_>)

execute this render pass. the pass receives a reference to the render engine and the current render pass encoder. use these to issue draw commands.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§