Changeset 28ea92f in opengl-game for vulkan-game.cpp


Ignore:
Timestamp:
Feb 14, 2021, 3:12:38 AM (4 years ago)
Author:
Dmitry Portnoy <dportnoy@…>
Branches:
feature/imgui-sdl
Children:
737c26a
Parents:
4e2c709
Message:

Rename the flag for recreating the swap chain to shouldRecreateSwapChain in both VulkanGame and SDLGame

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vulkan-game.cpp

    r4e2c709 r28ea92f  
    6565
    6666   this->currentFrame = 0;
    67    this->framebufferResized = false;
     67   shouldRecreateSwapChain = false;
    6868
    6969   this->object_VP_mats = {};
     
    812812            case UI_EVENT_WINDOWRESIZE:
    813813               cout << "Window resize event detected" << endl;
    814                framebufferResized = true;
     814               shouldRecreateSwapChain = true;
    815815               break;
    816816            case UI_EVENT_KEYDOWN:
     
    18001800   VkResult result = vkQueuePresentKHR(presentQueue, &presentInfo);
    18011801
    1802    if (result == VK_ERROR_OUT_OF_DATE_KHR || result == VK_SUBOPTIMAL_KHR || framebufferResized) {
    1803       framebufferResized = false;
     1802   if (result == VK_ERROR_OUT_OF_DATE_KHR || result == VK_SUBOPTIMAL_KHR || shouldRecreateSwapChain) {
     1803      shouldRecreateSwapChain = false;
    18041804      recreateSwapChain();
    18051805   } else if (result != VK_SUCCESS) {
Note: See TracChangeset for help on using the changeset viewer.