| 75 | } |
| 76 | |
| 77 | void MainLoopController::process() |
| 78 | { |
| 79 | glfwPollEvents(); |
| 80 | |
| 81 | ImGui_ImplOpenGL3_NewFrame(); |
| 82 | ImGui_ImplGlfw_NewFrame(); |
| 83 | ImGui::NewFrame(); |
| 84 | |
| 85 | // ImGui::ShowDemoWindow(NULL); |
| 86 | |
| 87 | int display_w, display_h; |
| 88 | glfwGetFramebufferSize(WindowController::get().getWindowData().window, &display_w, &display_h); |
| 89 | glViewport(0, 0, display_w, display_h); |
| 90 | |
| 91 | if (_programState == ProgramState::FirstTick) { |
| 92 | processFirstTick(); |
| 93 | } else if (_programState == ProgramState::LoadingScreen) { |
| 94 | processLoadingScreen(); |
| 95 | } else if (_programState == ProgramState::FadeOutLoadingScreen) { |
| 96 | processFadeOutLoadingScreen(); |
| 97 | } else if (_programState == ProgramState::FadeInUI) { |
| 98 | processFadeInUI(); |
| 99 | } else if (_programState == ProgramState::OperatingMode) { |
| 100 | processOperatingMode(); |
| 101 | } else if (_programState == ProgramState::ScheduleExit) { |
| 102 | processScheduleExit(); |
| 103 | } else if (_programState == ProgramState::Exiting) { |
| 104 | processExiting(); |
| 105 | } |
| 106 | |
| 107 | ImGui::Render(); |
| 108 | ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData()); |
| 109 | glfwSwapBuffers(WindowController::get().getWindowData().window); |
| 110 | } |
| 111 | |
| 112 | void MainLoopController::shutdown() |
| 113 | { |
no test coverage detected