diff options
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index 6382f51..9fb89bc 100644 --- a/src/main.rs +++ b/src/main.rs @@ -10,6 +10,7 @@ use crate::graphics::window_dressing::{ WindowDressing, N_SIMULTANEOUS_FRAMES }; use crate::linear_algebra::{ Vec3, Mat4, Transformation }; +use crate::files::obj::load_obj; use crate::shader_data::UniformBlock; use std::cell::RefCell; @@ -25,9 +26,9 @@ use winit::event_loop::{ ActiveEventLoop, EventLoop }; use winit::window::WindowId; mod error; +mod files; mod graphics; mod linear_algebra; -mod model_loader; mod shader_data; @@ -73,7 +74,9 @@ impl Surreality { enable_anisotropy)?; let mut render_state = RenderState::new(&permanent, &for_reinit, &window_dressing)?; - render_state.set_model(Model::new(&permanent, &window_dressing)?); + let (vertices, indices) = load_obj()?; + render_state.set_model(Model::new(vertices, indices, + &permanent, &window_dressing)?); *self.window_dressing.get_mut() = Some(window_dressing); *self.render_state.get_mut() = Some(render_state); |