Changeset 98f3232 in opengl-game
- Timestamp:
- Jul 11, 2019, 3:53:03 PM (5 years ago)
- Branches:
- feature/imgui-sdl, master, points-test
- Children:
- 321272c
- Parents:
- f286a10
- git-author:
- Dmitry Portnoy <dmitry.portnoy@…> (07/11/19 15:50:51)
- git-committer:
- Dmitry Portnoy <dmitry.portnoy@…> (07/11/19 15:53:03)
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
game-gui-sdl.hpp
rf286a10 r98f3232 1 //#include "game-gui.hpp"1 #include "game-gui.hpp" 2 2 3 #define RTWO_SUCCESS true 4 #define RTWO_ERROR false 5 6 class GameGui_SDL { 3 class GameGui_SDL : public GameGui { 7 4 public: 8 5 bool Init(); -
game-gui.hpp
rf286a10 r98f3232 1 #define RTWO_SUCCESS true 2 #define RTWO_ERROR false 3 1 4 class GameGui { 2 5 public: 3 virtual void Init(); 4 virtual void Shutdown(); 6 virtual ~GameGui() {}; 7 8 virtual bool Init() = 0; 9 virtual void Shutdown() = 0; 5 10 }; -
vulkan-game.cpp
rf286a10 r98f3232 91 91 } 92 92 private: 93 GameGui _SDL gui;93 GameGui* gui = new GameGui_SDL(); 94 94 SDL_Window* window = nullptr; 95 95 … … 106 106 // both SDL and GLFW create window functions return NULL on failure 107 107 bool initWindow() { 108 if (gui .Init() == RTWO_ERROR) {108 if (gui->Init() == RTWO_ERROR) { 109 109 cout << "UI library could not be initialized!" << endl; 110 110 return RTWO_ERROR; … … 416 416 SDL_DestroyWindow(window); 417 417 418 gui.Shutdown(); 418 gui->Shutdown(); 419 delete gui; 419 420 } 420 421 };
Note:
See TracChangeset
for help on using the changeset viewer.