Skip to content
Snippets Groups Projects
Commit 9462c280 authored by Sebastian Hahta's avatar Sebastian Hahta
Browse files

Merge branch 'feature/gui2' of gitlab.utu.fi:nicolas.pope/ftl into feature/gui2

parents cb85e54b dec9e8d9
No related branches found
No related tags found
1 merge request!316Resolves #343 GUI and Frame Refactor
Pipeline #28518 passed
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment