Trait BindUniform

Source
pub trait BindUniform<C, T, D> {
    // Required method
    fn bind_uniform(
        block: UniformMemberBlock,
        value: T,
        ctx: C,
        device: &D,
    ) -> Option<()>;
}
Expand description

A trait for a binder that binds the given value and context into the uniform for a shader pass.

Required Methods§

Source

fn bind_uniform( block: UniformMemberBlock, value: T, ctx: C, device: &D, ) -> 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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§