Trait pigeon_parrot::pipeline::Plumber
source · [−]pub trait Plumber<'a>: Deref<Target = PipelineCore> {
type PrepareContext;
type Uniforms: Pod + Copy + 'static;
fn description() -> PipelineDescription<'a>;
fn setup(pipe: Pipeline, painter: &Painter) -> Self;
fn prepare(
&'a mut self,
context: Self::PrepareContext,
paint: &mut Painter
) -> Vec<(&'a mut UniformBuffer, Vec<Self::Uniforms>)>;
}
Expand description
A trait for creating and managing a pipeline.
This trait is used to effectivly used to create your own pipeline while allowing parrot to perform some of the work.
Required Associated Types
type PrepareContext
type PrepareContext
A type that containts the neccissary data for updating the uniform buffer
Required Methods
fn description() -> PipelineDescription<'a>
fn description() -> PipelineDescription<'a>
Returns a PipelineDescription
. This describes the layout of vertecies, sets of bindings and your shader file.
Used to create your pipeline. Supplies the wgpu pipeline and device.
fn prepare(
&'a mut self,
context: Self::PrepareContext,
paint: &mut Painter
) -> Vec<(&'a mut UniformBuffer, Vec<Self::Uniforms>)>
fn prepare(
&'a mut self,
context: Self::PrepareContext,
paint: &mut Painter
) -> Vec<(&'a mut UniformBuffer, Vec<Self::Uniforms>)>
Create the uniforms neccissary for an update with the supplied Plumber::PrepareContext
.