Struct opengl_graphics::shader_uniforms::ShaderUniform
[−]
[src]
pub struct ShaderUniform<T: ?Sized> { /* fields omitted */ }
Describes a shader uniform of a given type.
Methods
impl ShaderUniform<SUFloat>[src]
fn set(&self, gl: &GlGraphics, value: f32)
Set the value of the float uniform.
impl ShaderUniform<SUInt>[src]
fn set(&self, gl: &GlGraphics, value: i32)
Set the value of the integer uniform.
impl ShaderUniform<SUVec2>[src]
fn set(&self, gl: &GlGraphics, value: &[f32; 2])
Set the value of the vector 2 uniform.
impl ShaderUniform<SUVec3>[src]
fn set(&self, gl: &GlGraphics, value: &[f32; 3])
Set the value of the vector 3 uniform.
impl ShaderUniform<SUVec4>[src]
fn set(&self, gl: &GlGraphics, value: &[f32; 4])
Set the value of the vector 4 uniform.
impl ShaderUniform<SUMat2x2>[src]
fn set(&self, gl: &GlGraphics, values: &[f32; 4])
Set the value of the 2x2 matrix uniform.
impl ShaderUniform<SUMat3x3>[src]
fn set(&self, gl: &GlGraphics, values: &[f32; 9])
Set the value of the 3x3 matrix uniform.
impl ShaderUniform<SUMat4x4>[src]
fn set(&self, gl: &GlGraphics, values: &[f32; 16])
Set the value of the 4x4 matrix uniform.
Trait Implementations
impl<T: Clone + ?Sized> Clone for ShaderUniform<T>[src]
fn clone(&self) -> ShaderUniform<T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more