From fc4a85604870988f3e518d037f07a4bba8da0c40 Mon Sep 17 00:00:00 2001 From: Florian RICHER Date: Sun, 17 Nov 2024 14:12:05 +0100 Subject: [PATCH] VkSwapchain: Revert rename surface_resolution --- src/vulkan/vk_swapchain.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/vulkan/vk_swapchain.rs b/src/vulkan/vk_swapchain.rs index 6845bf3..db8a36b 100644 --- a/src/vulkan/vk_swapchain.rs +++ b/src/vulkan/vk_swapchain.rs @@ -13,7 +13,7 @@ pub struct VkSwapchain { pub(super) desired_image_count: u32, pub(super) surface_format: vk::SurfaceFormatKHR, - pub(super) swapchain_extent: vk::Extent2D, + pub(super) surface_resolution: vk::Extent2D, pub(super) present_mode: vk::PresentModeKHR, pub(super) pre_transform: vk::SurfaceTransformFlagsKHR, @@ -63,7 +63,7 @@ impl VkSwapchain { swapchain_support_details, desired_image_count, surface_format, - swapchain_extent, + surface_resolution: swapchain_extent, present_mode, pre_transform, present_images: None, @@ -124,10 +124,10 @@ impl VkSwapchain { vk::Extent2D { width, height }, &self.swapchain_support_details.1, ); - if chosen_extent.width != self.swapchain_extent.width - || chosen_extent.height != self.swapchain_extent.height + if chosen_extent.width != self.surface_resolution.width + || chosen_extent.height != self.surface_resolution.height { - self.swapchain_extent = chosen_extent; + self.surface_resolution = chosen_extent; log::debug!(target: LOG_TARGET, "New resolution applied ({}x{})", chosen_extent.width, chosen_extent.height); self.create_swapchain()?; @@ -144,7 +144,7 @@ impl VkSwapchain { .min_image_count(self.desired_image_count) .image_color_space(self.surface_format.color_space) .image_format(self.surface_format.format) - .image_extent(self.swapchain_extent) + .image_extent(self.surface_resolution) .image_usage(vk::ImageUsageFlags::COLOR_ATTACHMENT) .image_sharing_mode(vk::SharingMode::EXCLUSIVE) .pre_transform(self.pre_transform)