Changeset c6f0793 in opengl-game
- Timestamp:
- Feb 14, 2021, 12:11:30 AM (4 years ago)
- Branches:
- feature/imgui-sdl
- Children:
- 9067efc
- Parents:
- d8cf709
- git-author:
- Dmitry Portnoy <dportnoy@…> (02/14/21 00:11:10)
- git-committer:
- Dmitry Portnoy <dportnoy@…> (02/14/21 00:11:30)
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
sdl-game.cpp
rd8cf709 rc6f0793 261 261 bool show_another_window = false; 262 262 263 // Main loop 264 bool done = false; 263 done = false; 265 264 while (!done) { 266 265 // Poll and handle events (inputs, window resize, etc.) -
sdl-game.hpp
rd8cf709 rc6f0793 6 6 7 7 #include <SDL2/SDL.h> 8 8 9 #include "IMGUI/imgui_impl_vulkan.h" 9 10 … … 36 37 const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData, 37 38 void* pUserData); 39 40 bool done; 38 41 39 42 // TODO: Good place to start using smart pointers -
vulkan-game.cpp
rd8cf709 rc6f0793 112 112 113 113 void VulkanGame::quitGame() { 114 this->quit= true;114 done = true; 115 115 } 116 116 … … 771 771 772 772 void VulkanGame::mainLoop() { 773 this->quit = false;774 775 773 this->startTime = high_resolution_clock::now(); 776 774 curTime = duration<float, seconds::period>(high_resolution_clock::now() - this->startTime).count(); … … 781 779 lastSpawn_asteroid = curTime; 782 780 783 while (!this->quit) { 781 done = false; 782 while (!done) { 784 783 785 784 this->prevTime = curTime; … … 805 804 case UI_EVENT_QUIT: 806 805 cout << "Quit event detected" << endl; 807 this->quit= true;806 done = true; 808 807 break; 809 808 case UI_EVENT_WINDOW: … … 821 820 822 821 if (e.key.keycode == SDL_SCANCODE_ESCAPE) { 823 this->quit= true;822 done = true; 824 823 } else if (e.key.keycode == SDL_SCANCODE_SPACE) { 825 824 cout << "Adding a plane" << endl; -
vulkan-game.hpp
rd8cf709 rc6f0793 241 241 const vec3 LASER_COLOR = vec3(0.2f, 1.0f, 0.2f); 242 242 243 bool quit;243 bool done; 244 244 245 245 vec3 cam_pos;
Note:
See TracChangeset
for help on using the changeset viewer.