From 57c91005ee7e8843a8c8bebf6da2bc108c9ab11e Mon Sep 17 00:00:00 2001 From: DanielMowitz <53856770+DanielMowitz@users.noreply.github.com> Date: Mon, 9 Mar 2020 15:07:10 +0100 Subject: [PATCH] Update bin.rs Actually use ExampleObj here --- src/bin.rs | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/bin.rs b/src/bin.rs index c153062..6dd085f 100644 --- a/src/bin.rs +++ b/src/bin.rs @@ -2,22 +2,19 @@ extern crate frame; extern crate sdl2; use frame::scene_manager::SceneManager; - -mod main_menu; -mod space_ship; -mod light_path; +use frame::renderer::Renderer; +use frame::dispatcher::Dispatcher; +use frame::example_obj::ExampleObj; fn main() { - let mut ship = space_ship::Spaceship::new(); - let mut renderer = frame::renderer::Renderer::new(512, 512, None); + let mut renderer = Renderer::new(512, 512, None); - let mut menu = main_menu::MainMenu::new(); let mut scene_manager = SceneManager::new(); - scene_manager.add_scenes(vec![&mut menu]); - - let mut disp = frame::dispatcher::Dispatcher::new(1.0 / 60.0); + let mut disp = Dispatcher::new(1.0 / 60.0); + + let mut obj = frame::game_loop( &mut disp,