Changeset c6f0793 in opengl-game for vulkan-game.cpp
- 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)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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;
Note:
See TracChangeset
for help on using the changeset viewer.