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