From f35b5419526d3546f1b290307ee23a2fd53d5345 Mon Sep 17 00:00:00 2001 From: swinston Date: Thu, 20 Aug 2026 17:47:17 -0700 Subject: [PATCH] Add a clarifying comment to chooseSwapExtent's currentExtent check --- en/03_Drawing_a_triangle/01_Presentation/01_Swap_chain.adoc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/en/03_Drawing_a_triangle/01_Presentation/01_Swap_chain.adoc b/en/03_Drawing_a_triangle/01_Presentation/01_Swap_chain.adoc index 5047177f..eef800a6 100644 --- a/en/03_Drawing_a_triangle/01_Presentation/01_Swap_chain.adoc +++ b/en/03_Drawing_a_triangle/01_Presentation/01_Swap_chain.adoc @@ -285,6 +285,9 @@ matching it against the minimum and maximum image extent. vk::Extent2D chooseSwapExtent(vk::SurfaceCapabilitiesKHR const &capabilities) { + // currentExtent is only set to the special "undefined" value described above + // when the window manager lets us choose the extent ourselves; any other value + // means the surface already dictates a fixed extent that we must use as-is. if (capabilities.currentExtent.width != std::numeric_limits::max()) { return capabilities.currentExtent;