Skip to content

Commit 7df5ca1

Browse files
committed
Fix documentation to match actual code
Replaces #97
1 parent 3d37e25 commit 7df5ca1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

en/03_Drawing_a_triangle/04_Swap_chain_recreation.adoc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ Both `VK_SUCCESS` and `VK_SUBOPTIMAL_KHR` are considered "success" return codes.
108108
----
109109
result = presentQueue.presentKHR( presentInfoKHR );
110110
if (result == vk::Result::eErrorOutOfDateKHR || result == vk::Result::eSuboptimalKHR) {
111-
framebufferResized = false;
112111
recreateSwapChain();
113112
} else if (result != vk::Result::eSuccess) {
114113
throw std::runtime_error("failed to present swap chain image!");
@@ -169,7 +168,7 @@ The `drawFrame` function should then be modified to also check for this flag:
169168

170169
[,c++]
171170
----
172-
if (result == vk::Result::eErrorOutOfDateKHR || result == vk::Result::eSuboptimalKHR) {
171+
if (result == vk::Result::eErrorOutOfDateKHR || result == vk::Result::eSuboptimalKHR || framebufferResized) {
173172
framebufferResized = false;
174173
recreateSwapChain();
175174
} else if (result != vk::Result::eSuccess) {

0 commit comments

Comments
 (0)