Trait amethyst_renderer::pipe::pass::Pass
[−]
[src]
pub trait Pass: for<'a> PassData<'a> { fn compile(&self, effect: NewEffect) -> Result<Effect>; fn apply<'a, 'b: 'a>(
&'a mut self,
encoder: &mut Encoder,
effect: &mut Effect,
factory: Factory,
data: Self::Data
); }
Structures implementing this provide a renderer pass.
Required Methods
fn compile(&self, effect: NewEffect) -> Result<Effect>
The pass is given an opportunity to compile shaders and store them in an Effect
which is then passed to the pass in apply
.
fn apply<'a, 'b: 'a>(
&'a mut self,
encoder: &mut Encoder,
effect: &mut Effect,
factory: Factory,
data: Self::Data
)
&'a mut self,
encoder: &mut Encoder,
effect: &mut Effect,
factory: Factory,
data: Self::Data
)
Called whenever the renderer is ready to apply the pass. Feed commands into the encoder here.
Implementors
impl<V> Pass for DrawFlat<V> where
V: Query<(Position, TexCoord)>,impl Pass for DrawFlatSeparate
impl<V> Pass for DrawPbm<V> where
V: Query<(Position, Normal, Tangent, TexCoord)>,impl Pass for DrawPbmSeparate
impl<V> Pass for DrawShaded<V> where
V: Query<(Position, Normal, TexCoord)>,impl Pass for DrawShadedSeparate