diff options
| author | Irene Knapp <ireneista@irenes.space> | 2026-07-22 01:07:29 -0700 |
|---|---|---|
| committer | Irene Knapp <ireneista@irenes.space> | 2026-07-27 01:58:36 -0700 |
| commit | 74ebf3d25e94b87a755d0ad0875332f962c8b92f (patch) | |
| tree | cbd707e70269ee84589fe735cdc4d0042602b809 /src/main.rs | |
| parent | 3ac1e5e5a9ebcb4beb2bfe149dd5095f2250f60d (diff) | |
generate mipmaps
Force-Push: yes Change-Id: I2683fa6e3f290a812b74e5b64701c3094bb5cbee
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 9 |
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; |