Load shaders to shaders/
[mandelwow.git] / mandelwow.rs
index 8e759ef8013a1efc8943e0e78853063dca79a5fe..41f7e5d8cabf569f25e401253ae96f1b87e5e50d 100644 (file)
@@ -29,11 +29,11 @@ fn mand(cx: f32, cy: f32) -> [f32; 3] {
 */
 
 pub fn program(display: &glium::Display) -> glium::Program {
-    return 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,
@@ -129,6 +129,6 @@ pub fn draw(display: &glium::Display,
             perspective: camera.get_perspective(),
         };
 
-        mandel(&display, &mut frame, &program, &uniforms, bounds, z0);
+        mandel(display, &mut frame, program, &uniforms, bounds, z0);
     }
 }