Struct kiss3d::resource::Shader
[−]
[src]
pub struct Shader { /* fields omitted */ }
Structure encapsulating a shader program.
Methods
impl Shader
[src]
fn new(vshader_path: &Path, fshader_path: &Path) -> Option<Shader>
Creates a new shader program from two files containing the vertex and fragment shader.
fn new_from_str(vshader: &str, fshader: &str) -> Shader
Creates a new shader program from strings of the vertex and fragment shader.
fn get_uniform<T: GLPrimitive>(&self, name: &str) -> Option<ShaderUniform<T>>
Gets a uniform variable from the shader program.
fn get_attrib<T: GLPrimitive>(&self, name: &str) -> Option<ShaderAttribute<T>>
Gets an attribute from the shader program.
fn use_program(&mut self)
Make this program active.