+4
-2
src/gfx.rs
+4
-2
src/gfx.rs
···
529
529
530
530
self.surface_config.width = new_size.width;
531
531
self.surface_config.height = new_size.height;
532
-
// self.depth_texture =
533
-
// texture::Texture::create_depth_texture(&self.device, &self.config, "depth_texture");
532
+
self.camera.positioning.aspect = self.surface_config.width as f32 / self.surface_config.height as f32;
534
533
self.surface.configure(&self.device, &self.surface_config);
534
+
535
+
self.depth_texture =
536
+
texture::Texture::create_depth_texture(&self.device, &self.surface_config, "depth_texture");
535
537
}
536
538
537
539
pub(crate) fn render(&self) -> Result<(), wgpu::SurfaceError> {