summary refs log tree commit diff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main.rs b/src/main.rs
index 478a179..af41b0d 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -10,7 +10,7 @@ use crate::linear_algebra::{ Vec3, Vec4, Mat4, Transformation };
 use crate::shader_data::UniformBlock;
 
 use std::cell::RefCell;
-use std::f32::consts::{ FRAC_PI_2, FRAC_PI_4, TAU };
+use std::f32::consts::{ FRAC_PI_4, TAU };
 use std::ptr::copy_nonoverlapping;
 use std::time::Instant;
 use vulkanalia::Device;
@@ -25,6 +25,7 @@ mod error;
 mod graphics_permanent;
 mod graphics_window_dressing;
 mod linear_algebra;
+mod model_loader;
 mod shader_data;
 
 
@@ -288,12 +289,11 @@ fn render_uniforms(device: &Device, device_memory: &vk::DeviceMemory,
 
   let scale = Vec3::new(1.0, 1.0, 1.0);
   let model = Transformation {
-    rotation: Vec4::rotation_quaternion(&Vec3::new(-1.0, 0.0, 0.0), FRAC_PI_2)
-                  .rotate(&Vec3::new(0.0, 1.0, 0.0), time % TAU),
+    rotation: Vec4::rotation_quaternion(&Vec3::new(0.0, 1.0, 0.0), time % TAU),
     translation: Vec3::new(0.0, 0.0, 0.0),
   };
-  let view = Transformation::look_at(&Vec3::new(0.0, -2.0, -2.0),
-                                     &Vec3::new(0.0, 0.0, 0.0),
+  let view = Transformation::look_at(&Vec3::new(0.0, -3.0, -8.0),
+                                     &Vec3::new(0.0, -1.0, 0.0),
                                      &Vec3::new(0.0, -1.0, 0.0));
   let aspect_ratio = extent.width as f32 / extent.height as f32;
   let projection = Mat4::perspective(FRAC_PI_4, aspect_ratio, 0.1, 10.0);