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

Skip to content

Commit 9321aef

Browse files
committed
Elaborate on the right moment to explicitly check for window resizes
1 parent 81a0d9c commit 9321aef

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

03_Drawing_a_triangle/04_Swap_chain_recreation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ if (result == VK_ERROR_OUT_OF_DATE_KHR || result == VK_SUBOPTIMAL_KHR || framebu
223223
}
224224
```
225225

226-
Now to actually detect resizes we can use the `glfwSetFramebufferSizeCallback` function in the GLFW framework to set up a callback:
226+
It is important to do this after `vkQueuePresentKHR` to ensure that the semaphores are in a consistent state, otherwise a signalled semaphore may never be properly waited upon. Now to actually detect resizes we can use the `glfwSetFramebufferSizeCallback` function in the GLFW framework to set up a callback:
227227

228228
```c++
229229
void initWindow() {

0 commit comments

Comments
 (0)