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

Skip to content

Commit b6ce4e5

Browse files
committed
Clarify presentation mode explanations (fixes #237)
1 parent 40f6eb3 commit b6ce4e5

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

en/03_Drawing_a_triangle/01_Presentation/01_Swap_chain.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,7 @@ right away when it finally arrives. This may result in visible tearing.
278278
* `VK_PRESENT_MODE_MAILBOX_KHR`: This is another variation of the second mode.
279279
Instead of blocking the application when the queue is full, the images that are
280280
already queued are simply replaced with the newer ones. This mode can be used to
281-
implement triple buffering, which allows you to avoid tearing with significantly
282-
less latency issues than standard vertical sync that uses double buffering.
281+
render frames as fast as possible while still avoiding tearing, resulting in fewer latency issues than standard vertical sync. This is commonly known as "triple buffering", although the existence of three buffers alone does not necessarily mean that the framerate is unlocked.
283282
284283
Only the `VK_PRESENT_MODE_FIFO_KHR` mode is guaranteed to be available, so we'll
285284
again have to write a function that looks for the best mode that is available:
@@ -290,10 +289,7 @@ VkPresentModeKHR chooseSwapPresentMode(const std::vector<VkPresentModeKHR>& avai
290289
}
291290
```
292291

293-
I personally think that triple buffering is a very nice trade-off. It allows us
294-
to avoid tearing while still maintaining a fairly low latency by rendering new
295-
images that are as up-to-date as possible right until the vertical blank. So,
296-
let's look through the list to see if it's available:
292+
I personally think that `VK_PRESENT_MODE_MAILBOX_KHR` is a very nice trade-off if energy usage is not a concern. It allows us to avoid tearing while still maintaining a fairly low latency by rendering new images that are as up-to-date as possible right until the vertical blank. On mobile devices, where energy usage is more important, you will probably want to use `VK_PRESENT_MODE_FIFO_KHR` instead. Now, let's look through the list to see if `VK_PRESENT_MODE_MAILBOX_KHR` is available:
297293

298294
```c++
299295
VkPresentModeKHR chooseSwapPresentMode(const std::vector<VkPresentModeKHR>& availablePresentModes) {

0 commit comments

Comments
 (0)