pub unsafe trait PipelineBase: ShadingGateBackend + TextureBase {
type PipelineRepr;
unsafe fn new_pipeline(
&mut self
) -> Result<Self::PipelineRepr, PipelineError>;
}
Expand description
The base trait of pipelines.
This trait exposes the PipelineBase::new_pipeline
method, which is called when a new pipeline is created. The
backend must create and allocate the data required to execute graphics pipelines, and is strongly advised to cache
that data so that this method is cheap after the first frame.
This trait has ShadingGate
and TextureBase
as super traits, as those are required to perform more operations
on pipelines.
Required Associated Types
type PipelineRepr
Required Methods
unsafe fn new_pipeline(&mut self) -> Result<Self::PipelineRepr, PipelineError>
unsafe fn new_pipeline(&mut self) -> Result<Self::PipelineRepr, PipelineError>
Create a new (cached) pipeline.