File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed
Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -108,7 +108,6 @@ Both `VK_SUCCESS` and `VK_SUBOPTIMAL_KHR` are considered "success" return codes.
108108----
109109result = presentQueue.presentKHR( presentInfoKHR );
110110if (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) {
You can’t perform that action at this time.
0 commit comments