Changeset 484334e in opengl-game for sdl-game.cpp


Ignore:
Timestamp:
Feb 14, 2021, 3:50:35 PM (4 years ago)
Author:
Dmitry Portnoy <dportnoy@…>
Branches:
feature/imgui-sdl
Children:
81869ef
Parents:
7734042
git-author:
Dmitry Portnoy <dportnoy@…> (02/14/21 15:48:29)
git-committer:
Dmitry Portnoy <dportnoy@…> (02/14/21 15:50:35)
Message:

In VulkanGame, correctly recreate the swap chain during the render loop, and in SDLGame, use the GameGui class to get the window dimensions during swap chain recreation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sdl-game.cpp

    r7734042 r484334e  
    169169
    170170      if (shouldRecreateSwapChain) {
    171          int width, height;
    172          SDL_GetWindowSize(window, &width, &height);
     171         gui->refreshWindowSize();
     172
     173         int width = gui->getWindowWidth();
     174         int height = gui->getWindowHeight();
    173175         if (width > 0 && height > 0) {
    174176            // TODO: This should be used if the min image count changes, presumably because a new surface was created
Note: See TracChangeset for help on using the changeset viewer.