view doesn't own scene
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
extern crate vrtue;
|
||||
use vrtue::{view, vr};
|
||||
use vrtue::{scenes, view, vr};
|
||||
use vrtue::scene::Scene;
|
||||
|
||||
extern crate env_logger;
|
||||
extern crate gfx_device_gl;
|
||||
@@ -18,14 +19,15 @@ pub fn main() {
|
||||
.vsync(false)
|
||||
.build().expect("Building Window");
|
||||
|
||||
let view = view::ViewRoot::<gfx_device_gl::Device,
|
||||
view::ColorFormat,
|
||||
view::DepthFormat>::create_view(&mut window, &mut vr);
|
||||
let mut scene = scenes::world::WorldScene::new(&mut window.factory);
|
||||
let view = view::ViewRoot::<gfx_device_gl::Device, view::ColorFormat, view::DepthFormat>
|
||||
::create_view(&mut window, &mut vr);
|
||||
|
||||
'main:
|
||||
//while let Some(_) = window.next() {
|
||||
loop {
|
||||
view.draw(&mut window, &mut vr);
|
||||
scene.update();
|
||||
view.draw(&mut window, &mut vr, &scene);
|
||||
|
||||
// handle window events
|
||||
while let Some(ev) = window.poll_event() {
|
||||
|
||||
Reference in New Issue
Block a user