Skip to main content

EffectCatalog

Trait EffectCatalog 

Source
pub trait EffectCatalog {
    // Required methods
    fn effect_definition(&self, id: &EffectId) -> Option<&EffectDef>;
    fn effect_reads_time(&self, id: &EffectId) -> bool;
    fn project_effect_id(&self, id: &str, version: u32) -> Option<&EffectId>;
}
Expand description

Effect information a graph builder needs without drawing. The GPU Renderer and the crate::CpuRenderer answer from the same EffectDefs, so a frame compiles to the same graph on either.

Required Methods§

Source

fn effect_definition(&self, id: &EffectId) -> Option<&EffectDef>

The definition registered as id.

Source

fn effect_reads_time(&self, id: &EffectId) -> bool

Whether id’s output can change with frame time alone; true for unknown effects.

Source

fn project_effect_id(&self, id: &str, version: u32) -> Option<&EffectId>

The identity a project’s effect id@version draws under; None if this renderer cannot draw it or it is internal.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§