use glium::index::{IndexBuffer, PrimitiveType};
pub fn solid_fill_program(display: &Display) -> Program {
- let vertex_shader_src = include_str!("solid.vert");
- let fragment_shader_src = include_str!("solid.frag");
+ let vertex_shader_src = include_str!("shaders/solid.vert");
+ let fragment_shader_src = include_str!("shaders/solid.frag");
Program::from_source(display, vertex_shader_src, fragment_shader_src, None).unwrap()
}
extern crate cgmath;
-#[macro_use(uniform,program,implement_vertex)]
+#[macro_use(uniform,implement_vertex)]
extern crate glium;
extern crate glutin;
#[cfg(feature = "image")]
*/
pub fn program(display: &glium::Display) -> glium::Program {
- program!(display,
- 100 => {
- vertex: include_str!("mandelwow.vert"),
- fragment: include_str!("mandelwow.frag"),
- }).unwrap()
+ Program::from_source(
+ display,
+ include_str!("shaders/mandelwow.vert"),
+ include_str!("shaders/mandelwow.frag"), None)
+ .unwrap()
}
fn mandel<U>(display: &glium::Display,
use glium::index::{IndexBuffer, PrimitiveType};
pub fn shaded_program(display: &Display) -> Program {
- let vertex_shader_src = include_str!("shaded.vert");
- let fragment_shader_src = include_str!("shaded.frag");
+ let vertex_shader_src = include_str!("shaders/shaded.vert");
+ let fragment_shader_src = include_str!("shaders/shaded.frag");
Program::from_source(display, vertex_shader_src, fragment_shader_src, None).unwrap()
}