summary refs log tree commit diff
path: root/src/main.rs
diff options
context:
space:
mode:
authorIrene Knapp <ireneista@irenes.space>2026-08-08 20:11:06 -0700
committerIrene Knapp <ireneista@irenes.space>2026-08-08 20:11:06 -0700
commit4b877079872248d3a4c17312b18599c6084e1e2d (patch)
tree1c764f0e7700e3cfec3aad64bf8bf3e1fa7b0261 /src/main.rs
parentd56eb5e4c223f5c89117cda8dfb1527e02b6a90c (diff)
move the obj loader to a more logical place
Force-Push: yes
Change-Id: I0d506fa517daeacf63b52fdd5900f1bbee9c22b7
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs7
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);