[−][src]Struct blaze_rs::shader::Shader
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]
location: UniformLoc,
count: i32,
transpose: bool,
value: &[f32]
)
Sets a uniform value for the currently used shader.
pub fn set_uniform_matrix_3fv(
location: UniformLoc,
count: i32,
transpose: bool,
value: &[f32]
)
[src]
location: UniformLoc,
count: i32,
transpose: bool,
value: &[f32]
)
Sets a uniform value for the currently used shader.
pub fn set_uniform_matrix_4fv(
location: UniformLoc,
count: i32,
transpose: bool,
value: &[f32]
)
[src]
location: UniformLoc,
count: i32,
transpose: bool,
value: &[f32]
)
Sets a uniform value for the currently used shader.
pub fn set_uniform_matrix_2x3fv(
location: UniformLoc,
count: i32,
transpose: bool,
value: &[f32]
)
[src]
location: UniformLoc,
count: i32,
transpose: bool,
value: &[f32]
)
Sets a uniform value for the currently used shader.
pub fn set_uniform_matrix_3x2fv(
location: UniformLoc,
count: i32,
transpose: bool,
value: &[f32]
)
[src]
location: UniformLoc,
count: i32,
transpose: bool,
value: &[f32]
)
Sets a uniform value for the currently used shader.
pub fn set_uniform_matrix_2x4fv(
location: UniformLoc,
count: i32,
transpose: bool,
value: &[f32]
)
[src]
location: UniformLoc,
count: i32,
transpose: bool,
value: &[f32]
)
Sets a uniform value for the currently used shader.
pub fn set_uniform_matrix_4x2fv(
location: UniformLoc,
count: i32,
transpose: bool,
value: &[f32]
)
[src]
location: UniformLoc,
count: i32,
transpose: bool,
value: &[f32]
)
Sets a uniform value for the currently used shader.
pub fn set_uniform_matrix_3x4fv(
location: UniformLoc,
count: i32,
transpose: bool,
value: &[f32]
)
[src]
location: UniformLoc,
count: i32,
transpose: bool,
value: &[f32]
)
Sets a uniform value for the currently used shader.
pub fn set_uniform_matrix_4x3fv(
location: UniformLoc,
count: i32,
transpose: bool,
value: &[f32]
)
[src]
location: UniformLoc,
count: i32,
transpose: bool,
value: &[f32]
)
Sets a uniform value for the currently used shader.
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,