Struct caper::shader::Shaders
[−]
[src]
pub struct Shaders { pub shaders: HashMap<&'static str, Program>, pub post_shaders: HashMap<&'static str, Program>, }
Contains all the shaders to be used
Fields
shaders: HashMap<&'static str, Program>
Map containing all the shaders used to render the RenderItems
post_shaders: HashMap<&'static str, Program>
Map containing all the shaders to be used for post processing
Methods
impl Shaders
[src]
fn new(display: &Display) -> Shaders
Creates a new instance of Shaders
fn add_shader(&mut self,
display: &Display,
name: &'static str,
vert: &'static str,
frag: &'static str,
geom: &'static str,
tess_cont: &'static str,
tess_eval: &'static str)
-> Result<&str, &str>
display: &Display,
name: &'static str,
vert: &'static str,
frag: &'static str,
geom: &'static str,
tess_cont: &'static str,
tess_eval: &'static str)
-> Result<&str, &str>
Add a new shader to the map that can used for rendering the RenderItems
fn add_post_shader(&mut self,
display: &Display,
name: &'static str,
vert: &'static str,
frag: &'static str)
-> Result<&str, &str>
display: &Display,
name: &'static str,
vert: &'static str,
frag: &'static str)
-> Result<&str, &str>
Add a new shader to the post_shaders map that can be used for rendering post processing