Skip to main content

BaseSpecializeFn

Type Alias BaseSpecializeFn 

Source
pub type BaseSpecializeFn = fn(&mut World, ErasedMaterialPipelineKey, &MeshVertexBufferLayoutRef, &Arc<MaterialProperties>) -> Result<CachedRenderPipelineId, SpecializedMeshPipelineError>;
Expand description

A type erased function pointer for specializing a material pipeline. The implementation is expected to:

  • Look up the appropriate specializer from the world
  • Downcast the erased key to the concrete key type
  • Call SpecializedMeshPipelines::specialize with the specializer and return the resulting pipeline id