Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions en/03_Drawing_a_triangle/01_Presentation/01_Swap_chain.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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<uint32_t>::max())
{
return capabilities.currentExtent;
Expand Down
Loading