pub trait UniformValue {
// Required method
fn set_uniform(&self, gl: &WebGl2RenderingContext, program: &WebGlProgram);
}
Expand description
Trait that abstracts WebGL2 uniforms.
This trait is implemented by objects that represent a WebGL2 uniform and its value, and which know how to set the value of the uniform if given a WebGL2 program with such uniform.
Required Methods§
Sourcefn set_uniform(&self, gl: &WebGl2RenderingContext, program: &WebGlProgram)
fn set_uniform(&self, gl: &WebGl2RenderingContext, program: &WebGlProgram)
Set the value of the uniform.
If the program
contains the uniform represented by self
, this
function sets the value of the uniform to the value stored by self
. If
the program does not contain the uniform, this function does nothing.