diff --git a/applications/gui2/src/main.cpp b/applications/gui2/src/main.cpp index 85d6c38d3b152c7a1871478925e5417c5bfb5121..bbdd04963627feac3b2cdc831e25ee5f15725df8 100644 --- a/applications/gui2/src/main.cpp +++ b/applications/gui2/src/main.cpp @@ -106,7 +106,7 @@ void FTLGui::mainloop() { screen_->setVisible(true); screen_->drawAll(); - //float last_draw_time = 0.0f; + float last_draw_time = 0.0f; while (ftl::running) { if (!screen_->visible()) { @@ -117,8 +117,8 @@ void FTLGui::mainloop() { ftl::running = false; } else { - //float now = float(glfwGetTime()); - //float delta = now - last_draw_time; + float now = float(glfwGetTime()); + float delta = now - last_draw_time; // Generate poses and render and virtual frame here // at full FPS (25 without VR and 90 with VR currently) @@ -127,10 +127,10 @@ void FTLGui::mainloop() { io_->feed()->render(); // Only draw the GUI at 25fps - //if (delta >= 0.04f) { - // last_draw_time = now; + if (delta >= 0.04f) { + last_draw_time = now; screen_->drawAll(); - //} + } } // Wait for mouse/keyboard or empty refresh events