Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e3036d6

Browse files
committed
Fix swap chain chapter not describing required include
1 parent fb2d236 commit e3036d6

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

03_Drawing_a_triangle/01_Presentation/01_Swap_chain.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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
353353
The `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
585585
window. The next two chapters will cover how we can set up the images as render
586586
targets 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)

0 commit comments

Comments
 (0)