[][src]Struct blaze_rs::shader::Shader

pub struct Shader<'a> {
    pub is_default: bool,
    // some fields omitted
}

Defines a handle to a custom shader.

Fields

is_default: bool

Indicates if this is a default shader or not.

Methods

impl<'a> Shader<'a>[src]

pub fn compile(vertex: &str, fragment: &str) -> Result<Shader<'a>, String>[src]

Compiles a new shader.

pub fn get_default() -> Shader<'a>[src]

Returns the default shader used by library.

pub fn make_current(&self) -> CallResult[src]

Sets this shader as current.

pub fn get_uniform_location(&self, name: &str) -> Option<UniformLoc>[src]

Returns the location of an uniform variable with specified name for the current shader.

pub fn set_uniform1f(location: UniformLoc, v0: f32)[src]

Sets a uniform value for the currently used shader.

pub fn set_uniform2f(location: UniformLoc, v0: f32, v1: f32)[src]

Sets a uniform value for the currently used shader.

pub fn set_uniform3f(location: UniformLoc, v0: f32, v1: f32, v2: f32)[src]

Sets a uniform value for the currently used shader.

pub fn set_uniform4f(location: UniformLoc, v0: f32, v1: f32, v2: f32, v3: f32)[src]

Sets a uniform value for the currently used shader.

pub fn set_uniform1i(location: UniformLoc, v0: i32)[src]

Sets a uniform value for the currently used shader.

pub fn set_uniform2i(location: UniformLoc, v0: i32, v1: i32)[src]

Sets a uniform value for the currently used shader.

pub fn set_uniform3i(location: UniformLoc, v0: i32, v1: i32, v2: i32)[src]

Sets a uniform value for the currently used shader.

pub fn set_uniform4i(location: UniformLoc, v0: i32, v1: i32, v2: i32, v3: i32)[src]

Sets a uniform value for the currently used shader.

pub fn set_uniform1ui(location: UniformLoc, v0: u32)[src]

Sets a uniform value for the currently used shader.

pub fn set_uniform2ui(location: UniformLoc, v0: u32, v1: u32)[src]

Sets a uniform value for the currently used shader.

pub fn set_uniform3ui(location: UniformLoc, v0: u32, v1: u32, v2: u32)[src]

Sets a uniform value for the currently used shader.

pub fn set_uniform4ui(location: UniformLoc, v0: u32, v1: u32, v2: u32, v3: u32)[src]

Sets a uniform value for the currently used shader.

pub fn set_uniform_matrix_2fv(
    location: UniformLoc,
    count: i32,
    transpose: bool,
    value: &[f32]
)
[src]

Sets a uniform value for the currently used shader.

pub fn set_uniform_matrix_3fv(
    location: UniformLoc,
    count: i32,
    transpose: bool,
    value: &[f32]
)
[src]

Sets a uniform value for the currently used shader.

pub fn set_uniform_matrix_4fv(
    location: UniformLoc,
    count: i32,
    transpose: bool,
    value: &[f32]
)
[src]

Sets a uniform value for the currently used shader.

pub fn set_uniform_matrix_2x3fv(
    location: UniformLoc,
    count: i32,
    transpose: bool,
    value: &[f32]
)
[src]

Sets a uniform value for the currently used shader.

pub fn set_uniform_matrix_3x2fv(
    location: UniformLoc,
    count: i32,
    transpose: bool,
    value: &[f32]
)
[src]

Sets a uniform value for the currently used shader.

pub fn set_uniform_matrix_2x4fv(
    location: UniformLoc,
    count: i32,
    transpose: bool,
    value: &[f32]
)
[src]

Sets a uniform value for the currently used shader.

pub fn set_uniform_matrix_4x2fv(
    location: UniformLoc,
    count: i32,
    transpose: bool,
    value: &[f32]
)
[src]

Sets a uniform value for the currently used shader.

pub fn set_uniform_matrix_3x4fv(
    location: UniformLoc,
    count: i32,
    transpose: bool,
    value: &[f32]
)
[src]

Sets a uniform value for the currently used shader.

pub fn set_uniform_matrix_4x3fv(
    location: UniformLoc,
    count: i32,
    transpose: bool,
    value: &[f32]
)
[src]

Sets a uniform value for the currently used shader.

Trait Implementations

impl<'a> Drop for Shader<'a>[src]

Auto Trait Implementations

impl<'a> !Send for Shader<'a>

impl<'a> !Sync for Shader<'a>

Blanket Implementations

impl<T> From for T[src]

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

impl<T, U> TryFrom for T where
    U: Into<T>, 
[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> Any for T where
    T: 'static + ?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.