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
What a renderer can tell a graph builder about the effects it draws,
without drawing anything: the GPU Renderer’s registry and the
crate::CpuRenderer’s kernels answer from the same EffectDefs, so
a frame compiles to the same graph whichever renderer draws it.
Required Methods§
Sourcefn effect_definition(&self, id: &EffectId) -> Option<&EffectDef>
fn effect_definition(&self, id: &EffectId) -> Option<&EffectDef>
The definition registered as id.
Sourcefn effect_reads_time(&self, id: &EffectId) -> bool
fn effect_reads_time(&self, id: &EffectId) -> bool
Whether what id draws can change with the frame time alone. An
effect that is not registered answers true.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".