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]
fn from_file(context: &RenderContext, file: &str) -> Result<Self>
[src]
Creates a program from a fragment shader file.
fn from_string(context: &RenderContext, source: &str) -> Result<Self>
[src]
Creates a program from a fragment shader string.
fn set_uniform<T>(&mut self, name: &str, value: &T) where
T: AsUniform,
[src]
T: AsUniform,
Sets a uniform value by name.
fn remove_uniform<T>(&mut self, name: &str) -> bool
[src]
Removes a uniform value by name.