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§
Required Methods§
Sourcefn specialize(
&self,
key: Self::Key,
layout: &MeshVertexBufferLayoutRef,
) -> Result<RenderPipelineDescriptor, SpecializedMeshPipelineError>
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
.