Changeset 301c90a in opengl-game for vulkan-game.hpp


Ignore:
Timestamp:
Mar 13, 2021, 10:37:06 PM (4 years ago)
Author:
Dmitry Portnoy <dportnoy@…>
Branches:
feature/imgui-sdl
Children:
d255d52
Parents:
187b0f5
Message:

Implement the start of a generic UI system built on top of IMGUI, which can reposition elements when the screen is resized, and use it in VulkanGame

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vulkan-game.hpp

    r187b0f5 r301c90a  
    243243      SDL_Window* window = nullptr;
    244244
     245      int drawableWidth, drawableHeight;
     246
    245247      VkInstance instance;
    246248      VkDebugUtilsMessengerEXT debugMessenger;
     
    360362      /*** High-level vars ***/
    361363
    362       void (VulkanGame::* currentRenderScreenFn)();
     364      // TODO: Just typedef the type of this function to RenderScreenFn or something since it's used in a few places
     365      void (VulkanGame::* currentRenderScreenFn)(int width, int height);
    363366
    364367      map<string, vector<UIValue>> valueLists;
     
    456459      /*** High-level functions ***/
    457460
    458       void renderMainScreen();
    459       void renderGameScreen();
     461      void renderMainScreen(int width, int height);
     462      void renderGameScreen(int width, int height);
    460463
    461464      void initGuiValueLists(map<string, vector<UIValue>>& valueLists);
    462465      void renderGuiValueList(vector<UIValue>& values);
    463466
    464       void goToScreen(void (VulkanGame::* renderScreenFn)());
     467      void goToScreen(void (VulkanGame::* renderScreenFn)(int width, int height));
    465468      void quitGame();
    466469};
Note: See TracChangeset for help on using the changeset viewer.