Struct radiant_rs::Program
[−]
[src]
pub struct Program { /* 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.
Methods
impl Program
[src]
fn from_file(context: &RenderContext, file: &str) -> Result<Self>
Creates a program from a fragment shader file.
fn from_string(context: &RenderContext, source: &str) -> Result<Self>
Creates a program from a fragment shader string.
fn set_uniform<T>(&mut self, name: &str, value: &T) where T: AsUniform
Sets a uniform value by name.
fn remove_uniform<T>(&mut self, name: &str) -> bool
Removes a uniform value by name.
Trait Implementations
impl Clone for Program
[src]
fn clone(&self) -> Program
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