[−][src]Trait luminance::shader::program::UniformInterface
Class of types that can act as uniform interfaces in typed programs.
A uniform interface is a value that contains uniforms. The purpose of a uniform interface is to be stored in a typed program and handed back when the program is made available in a pipeline.
The E
type variable represents the environment and might be used to drive the implementation
from a value. It’s defaulted to ()
so that if you don’t use the environment, you don’t have to
worry about that value when creating the shader program.
Required methods
fn uniform_interface<'a>(
builder: &mut UniformBuilder<'a>,
env: E
) -> Result<Self, ProgramError>
builder: &mut UniformBuilder<'a>,
env: E
) -> Result<Self, ProgramError>
Build the uniform interface.
When mapping a uniform, if you want to accept failures, you can discard the error and use
UniformBuilder::unbound
to let the uniform pass through, and collect the uniform warning.
Implementations on Foreign Types
impl UniformInterface<()> for ()
[src]
fn uniform_interface<'a>(
_: &mut UniformBuilder<'a>,
_: ()
) -> Result<Self, ProgramError>
[src]
_: &mut UniformBuilder<'a>,
_: ()
) -> Result<Self, ProgramError>