[][src]Struct opengl_graphics::shader_uniforms::ShaderUniform

pub struct ShaderUniform<T: ?Sized> { /* fields omitted */ }

Describes a shader uniform of a given type.

Methods

impl ShaderUniform<SUFloat>
[src]

pub fn set(&self, gl: &GlGraphics, value: f32)
[src]

Set the value of the float uniform.

impl ShaderUniform<SUInt>
[src]

pub fn set(&self, gl: &GlGraphics, value: i32)
[src]

Set the value of the integer uniform.

impl ShaderUniform<SUVec2>
[src]

pub fn set(&self, gl: &GlGraphics, value: &[f32; 2])
[src]

Set the value of the vector 2 uniform.

impl ShaderUniform<SUVec3>
[src]

pub fn set(&self, gl: &GlGraphics, value: &[f32; 3])
[src]

Set the value of the vector 3 uniform.

impl ShaderUniform<SUVec4>
[src]

pub fn set(&self, gl: &GlGraphics, value: &[f32; 4])
[src]

Set the value of the vector 4 uniform.

impl ShaderUniform<SUMat2x2>
[src]

pub fn set(&self, gl: &GlGraphics, values: &[f32; 4])
[src]

Set the value of the 2x2 matrix uniform.

impl ShaderUniform<SUMat3x3>
[src]

pub fn set(&self, gl: &GlGraphics, values: &[f32; 9])
[src]

Set the value of the 3x3 matrix uniform.

impl ShaderUniform<SUMat4x4>
[src]

pub fn set(&self, gl: &GlGraphics, values: &[f32; 16])
[src]

Set the value of the 4x4 matrix uniform.

Trait Implementations

impl<T: Copy + ?Sized> Copy for ShaderUniform<T>
[src]

impl<T: Clone + ?Sized> Clone for ShaderUniform<T>
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<T: ?Sized> Send for ShaderUniform<T> where
    T: Send

impl<T: ?Sized> Sync for ShaderUniform<T> where
    T: Sync

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> SetParameter for T

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 

Sets value as a parameter of self.