Trait librashader_runtime::uniforms::BindUniform
source · pub trait BindUniform<C, T> {
fn bind_uniform(value: T, ctx: C) -> Option<()>;
}Expand description
A trait for a binder that binds the given value and context into the uniform for a shader pass.
Required Methods§
sourcefn bind_uniform(value: T, ctx: C) -> Option<()>
fn bind_uniform(value: T, ctx: C) -> Option<()>
Bind the given value to the shader uniforms given the input context.
A BindUniform implementation should not write to a backing buffer from a UniformStorage.
If the binding is successful and no writes to a backing buffer is necessary, this function should return Some(()).
If this function returns None, then the value will instead be written to the backing buffer.