File tree Expand file tree Collapse file tree
03_Drawing_a_triangle/01_Presentation Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -344,15 +344,15 @@ VkExtent2D chooseSwapExtent(const VkSurfaceCapabilitiesKHR& capabilities) {
344344
345345 actualExtent.width = std::max(capabilities.minImageExtent.width, std::min(capabilities.maxImageExtent.width, actualExtent.width));
346346 actualExtent.height = std::max(capabilities.minImageExtent.height, std::min(capabilities.maxImageExtent.height, actualExtent.height));
347-
347+
348348 return actualExtent;
349349 }
350350}
351351```
352352
353353The `max` and `min` functions are used here to clamp the value of `WIDTH` and
354354`HEIGHT` between the allowed minimum and maximum extents that are supported by
355- the implementation.
355+ the implementation. Make sure to include the `<algorithm>` header to use them.
356356
357357## Creating the swap chain
358358
@@ -585,4 +585,4 @@ We now have a set of images that can be drawn onto and can be presented to the
585585window. The next two chapters will cover how we can set up the images as render
586586targets and then we start looking into the actual drawing commands!
587587
588- [ Full code listing] ( /code/swap_chain_creation.cpp )
588+ [ Full code listing] ( /code/swap_chain_creation.cpp )
You can’t perform that action at this time.
0 commit comments