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.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs
index ae56f2a..e80e2be 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -290,10 +290,9 @@ fn render_uniforms(device: &Device, device_memory: &vk::DeviceMemory,
                   .rotate(&Vec3::new(0.0, 1.0, 0.0), time % TAU),
     translation: Vec3::new(0.0, 0.0, 0.0),
   };
-  let view = Transformation {
-    rotation: Vec4::rotation_quaternion(&Vec3::new(1.0, 0.0, 0.0), 0.1),
-    translation: Vec3::new(0.0, 0.0, 2.0),
-  };
+  let view = Transformation::look_at(&Vec3::new(0.0, -1.0, -2.0),
+                                     &Vec3::new(0.0, 0.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);
   let block = UniformBlock::<f32> { scale, model, view, projection };