Remove placeholder game loop code.
[mandelwow.git] / support / mod.rs
index 068a524b4817dd5ce4c10a28579473029c8f3cc4..b71f50d7c50a2f84c18b4bfb2702771087623f82 100644 (file)
@@ -3,12 +3,11 @@
 extern crate genmesh;
 extern crate obj;
 
-use std::thread;
-use std::time::{Duration, Instant};
 use glium::{self, Display};
 use glium::vertex::VertexBufferAny;
 
 pub mod camera;
+pub mod vec3;
 
 pub enum Action {
     Stop,
@@ -16,27 +15,11 @@ pub enum Action {
 }
 
 pub fn start_loop<F>(mut callback: F) where F: FnMut() -> Action {
-    let mut accumulator = Duration::new(0, 0);
-    let mut previous_clock = Instant::now();
-
     loop {
         match callback() {
             Action::Stop => break,
             Action::Continue => ()
         };
-
-        let now = Instant::now();
-        accumulator += now - previous_clock;
-        previous_clock = now;
-
-        let fixed_time_stamp = Duration::new(0, 16666667);
-        while accumulator >= fixed_time_stamp {
-            accumulator -= fixed_time_stamp;
-
-            // if you have a game, update the state here
-        }
-
-        thread::sleep(fixed_time_stamp - accumulator);
     }
 }