Struct radiant_rs::Program [−][src]
pub struct Program { pub uniforms: UniformList, // some fields omitted }
A shader program and its uniforms.
Cloning a program creates a new program, referencing the internal shaders of the source program but using its own copy of the uniforms.
Fields
uniforms: UniformList
Methods
impl Program
[src]
impl Program
pub fn from_file(context: &RenderContext, file: &str) -> Result<Self>
[src]
pub fn from_file(context: &RenderContext, file: &str) -> Result<Self>
Creates a program from a fragment shader file.
pub fn from_string(context: &RenderContext, source: &str) -> Result<Self>
[src]
pub fn from_string(context: &RenderContext, source: &str) -> Result<Self>
Creates a program from a fragment shader string.
pub fn set_uniform<T>(&mut self, name: &str, value: &T) where
T: AsUniform,
[src]
pub fn set_uniform<T>(&mut self, name: &str, value: &T) where
T: AsUniform,
Sets a uniform value by name.
pub fn remove_uniform<T>(&mut self, name: &str) -> bool
[src]
pub fn remove_uniform<T>(&mut self, name: &str) -> bool
Removes a uniform value by name.
Trait Implementations
impl Clone for Program
[src]
impl Clone for Program
fn clone(&self) -> Program
[src]
fn clone(&self) -> Program
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Debug for Program
[src]
impl Debug for Program