use trackpad to move camera/world

This commit is contained in:
2016-09-30 23:25:31 -07:00
parent 9323380d5c
commit 8211912b44
4 changed files with 115 additions and 12 deletions

View File

@@ -26,7 +26,7 @@ pub fn main() {
'main:
//while let Some(_) = window.next() {
loop {
scene.update(&mut window.encoder);
scene.update(&mut vr, &mut window.encoder);
view.draw(&mut window, &mut vr, &scene);
// handle window events
@@ -38,6 +38,11 @@ pub fn main() {
scene.event(Event::Piston(ev));
}
// handle VR events
while let Some(ev) = vr.poll_next_event() {
scene.event(Event::Vr(ev));
}
}
debug!("shutting down");