SpecializedMeshPipeline

Trait SpecializedMeshPipeline 

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

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

A trait that allows constructing different variants of a render pipeline from a key and the particular mesh’s vertex buffer layout.

See SpecializedMeshPipelines 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, layout: &MeshVertexBufferLayoutRef, ) -> Result<RenderPipelineDescriptor, SpecializedMeshPipelineError>

Construct a new render pipeline based on the provided key and vertex layout.

The returned pipeline descriptor should have a single vertex buffer, which is derived from layout.

Implementors§