summary refs log tree commit diff
path: root/src/graphics/model.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/graphics/model.rs')
-rw-r--r--src/graphics/model.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/graphics/model.rs b/src/graphics/model.rs
index bda064c..01e8731 100644
--- a/src/graphics/model.rs
+++ b/src/graphics/model.rs
@@ -5,7 +5,6 @@ use crate::graphics::render_state::RenderState;
 use crate::graphics::util::init_buffer;
 use crate::graphics::window_dressing::WindowDressing;
 use crate::linear_algebra::{ Vec3, Vec4, Transformation };
-use crate::model_loader::load_model;
 use crate::shader_data::{ Vertex, VertexPushBlock };
 
 use std::f32::consts::{ TAU };
@@ -26,7 +25,8 @@ pub struct Model {
 
 
 impl Model {
-  pub fn new(permanent: &PermanentGraphicsState,
+  pub fn new(vertices: Vec<Vertex<f32>>, indices: Vec<u32>,
+             permanent: &PermanentGraphicsState,
              window_dressing: &WindowDressing)
       -> Result<Self>
   {
@@ -35,7 +35,6 @@ impl Model {
     let graphics_queue = &permanent.graphics_queue;
     let transient_command_pool = &window_dressing.transient_command_pool;
 
-    let (vertices, indices) = load_model()?;
     let index_count = indices.len();
 
     let (vertex_buffer, vertex_buffer_memory)