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.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs
index af41b0d..3267d0b 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -61,12 +61,13 @@ impl Surreality {
 
   #[allow(unsafe_code)]
   fn init(&mut self, event_loop: &ActiveEventLoop) -> Result<()> {
-    let (permanent, for_reinit, enable_swapchain)
+    let (permanent, for_reinit, enable_anisotropy, enable_swapchain)
         = PermanentGraphicsState::new(event_loop)?;
 
     if enable_swapchain.0 {
       *self.window_dressing.get_mut()
-          = Some(WindowDressing::new(&permanent, &for_reinit)?);
+          = Some(WindowDressing::new(&permanent, &for_reinit,
+                                     enable_anisotropy)?);
     }
 
     *self.permanent.get_mut() = Some(permanent);
@@ -292,11 +293,11 @@ fn render_uniforms(device: &Device, device_memory: &vk::DeviceMemory,
     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, -3.0, -8.0),
+  let view = Transformation::look_at(&Vec3::new(0.0, -3.0, -10.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);
+  let projection = Mat4::perspective(FRAC_PI_4, aspect_ratio, 0.1, 100.0);
   let block = UniformBlock::<f32> { scale, model, view, projection };
 
   let size = size_of::<UniformBlock<f32>>() as u64;