Struct luminance::shader::Program [−][src]
pub struct Program<B, Sem, Out, Uni> where
B: Shader, { /* fields omitted */ }
Expand description
A shader program.
Shader programs are GPU binaries that execute when a draw command is issued.
Parametricity
B
is the backend type.Sem
is theSemantics
type.Out
is the render target type.Uni
is theUniformInterface
type.
Implementations
pub fn adapt<Q>(
self
) -> Result<BuiltProgram<B, Sem, Out, Q>, AdaptationFailure<B, Sem, Out, Uni>> where
Q: UniformInterface<B>,
pub fn adapt<Q>(
self
) -> Result<BuiltProgram<B, Sem, Out, Q>, AdaptationFailure<B, Sem, Out, Uni>> where
Q: UniformInterface<B>,
Create a new UniformInterface
but keep the Program
around without rebuilding it.
Parametricity
Q
is the newUniformInterface
.
pub fn adapt_env<Q, E>(
self,
env: &mut E
) -> Result<BuiltProgram<B, Sem, Out, Q>, AdaptationFailure<B, Sem, Out, Uni>> where
Q: UniformInterface<B, E>,
pub fn adapt_env<Q, E>(
self,
env: &mut E
) -> Result<BuiltProgram<B, Sem, Out, Q>, AdaptationFailure<B, Sem, Out, Uni>> where
Q: UniformInterface<B, E>,
Create a new UniformInterface
but keep the Program
around without rebuilding it, by
using a mutable environment variable.
Parametricity
Q
is the newUniformInterface
.E
is the mutable environment variable.
pub fn readapt_env<E>(
self,
env: &mut E
) -> Result<BuiltProgram<B, Sem, Out, Uni>, AdaptationFailure<B, Sem, Out, Uni>> where
Uni: UniformInterface<B, E>,
pub fn readapt_env<E>(
self,
env: &mut E
) -> Result<BuiltProgram<B, Sem, Out, Uni>, AdaptationFailure<B, Sem, Out, Uni>> where
Uni: UniformInterface<B, E>,
Re-create the UniformInterface
but keep the Program
around without rebuilding it.
Parametricity
E
is the mutable environment variable.