SpecializedRenderPipeline

Trait SpecializedRenderPipeline 

Source
pub trait SpecializedRenderPipeline {
    type Key: Clone + Hash + PartialEq + Eq;

    // Required method
    fn specialize(&self, key: Self::Key) -> RenderPipelineDescriptor;
}
Expand description

A trait that allows constructing different variants of a render pipeline from a key.

Note: This is intended for modifying your pipeline descriptor on the basis of a key. If your key contains no data then you don’t need to specialize. For example, if you are using the AsBindGroup without the #[bind_group_data] attribute, you don’t need to specialize. Instead, create the pipeline directly from PipelineCache and store its ID.

See SpecializedRenderPipelines for more info.

Required Associated Types§

Source

type Key: Clone + Hash + PartialEq + Eq

The key that defines each “variant” of the render pipeline.

Required Methods§

Source

fn specialize(&self, key: Self::Key) -> RenderPipelineDescriptor

Construct a new render pipeline based on the provided key.

Implementors§