We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The range of the possible resolutions is defined in the VkSurfaceCapabilitiesKHR structure. Vulkan tells us to match the resolution of the window by setting the width and height in the currentExtent member. However, some window managers do allow us to differ here and this is indicated by setting the width and height in currentExtent to a special value: the maximum value of uint32_t. In that case we’ll pick the resolution that best matches the window within the minImageExtent and maxImageExtent bounds. But we must specify the resolution in the correct unit
So if Vulkan doesn’t fix the swap extent for us, we can’t just use the original {WIDTH, HEIGHT}. Instead, we must use glfwGetFramebufferSize to query the resolution of the window in pixel before matching it against the minimum and maximum image extent.
currentExtent is the current width and height of the surface, or the special value (0xFFFFFFFF, 0xFFFFFFFF) indicating that the surface size will be determined by the extent of a swapchain targeting the surface.
From those quotes I understood that if
capabilities.currentExtent.width == std::numeric_limits<uint32_t>::max()
then, Vulkan already did set up the correct extent, right?
So, if my understanding was correct, the comparison should be ==, not != thus avoiding the call to glfwGetFramebufferSize()
==
!=
glfwGetFramebufferSize()
Vulkan-Tutorial/en/03_Drawing_a_triangle/01_Presentation/01_Swap_chain.adoc
Line 324 in c6df655
The text was updated successfully, but these errors were encountered:
No branches or pull requests
From those quotes I understood that if
capabilities.currentExtent.width == std::numeric_limits<uint32_t>::max()
then, Vulkan already did set up the correct extent, right?
So, if my understanding was correct, the comparison should be
==
, not!=
thus avoiding the call toglfwGetFramebufferSize()
Vulkan-Tutorial/en/03_Drawing_a_triangle/01_Presentation/01_Swap_chain.adoc
Line 324 in c6df655
The text was updated successfully, but these errors were encountered: