Struct luminance::shading_gate::ShadingGate [−][src]
pub struct ShadingGate<'a, B> { /* fields omitted */ }
Expand description
A shading gate.
This is obtained after entering a PipelineGate
.
Parametricity
B
is the backend type.
Implementations
pub fn shade<E, Sem, Out, Uni, F>(
&mut self,
program: &mut Program<B, Sem, Out, Uni>,
f: F
) -> Result<(), E> where
Sem: Semantics,
Uni: UniformInterface<B>,
F: for<'b> FnOnce(ProgramInterface<'b, B>, &'b Uni, RenderGate<'b, B>) -> Result<(), E>,
pub fn shade<E, Sem, Out, Uni, F>(
&mut self,
program: &mut Program<B, Sem, Out, Uni>,
f: F
) -> Result<(), E> where
Sem: Semantics,
Uni: UniformInterface<B>,
F: for<'b> FnOnce(ProgramInterface<'b, B>, &'b Uni, RenderGate<'b, B>) -> Result<(), E>,
Enter a ShadingGate
by using a shader Program
.
The argument closure is given two arguments:
- A
ProgramInterface
, that allows to pass values (viaProgramInterface::set
) to the in-use shaderProgram
and/or perform dynamic lookup of uniforms. - A
RenderGate
, allowing to create deeper nodes in the graphics pipeline.