diff options
| author | Irene Knapp <ireneista@irenes.space> | 2026-08-08 20:11:06 -0700 |
|---|---|---|
| committer | Irene Knapp <ireneista@irenes.space> | 2026-08-08 20:11:06 -0700 |
| commit | 4b877079872248d3a4c17312b18599c6084e1e2d (patch) | |
| tree | 1c764f0e7700e3cfec3aad64bf8bf3e1fa7b0261 /src/graphics/model.rs | |
| parent | d56eb5e4c223f5c89117cda8dfb1527e02b6a90c (diff) | |
move the obj loader to a more logical place
Force-Push: yes Change-Id: I0d506fa517daeacf63b52fdd5900f1bbee9c22b7
Diffstat (limited to 'src/graphics/model.rs')
| -rw-r--r-- | src/graphics/model.rs | 5 |
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) |