Skip to content
Snippets Groups Projects
Commit 90ebd066 authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Timeout waitEvents to ensure GUI refresh

parent 58af9609
No related branches found
No related tags found
1 merge request!316Resolves #343 GUI and Frame Refactor
Pipeline #28306 failed
......@@ -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,7 +117,7 @@ void FTLGui::mainloop() {
ftl::running = false;
}
else {
float now = float(glfwGetTime());
//float now = float(glfwGetTime());
//float delta = now - last_draw_time;
// Generate poses and render and virtual frame here
......@@ -128,13 +128,13 @@ void FTLGui::mainloop() {
// Only draw the GUI at 25fps
//if (delta >= 0.04f) {
last_draw_time = now;
// last_draw_time = now;
screen_->drawAll();
//}
}
// Wait for mouse/keyboard or empty refresh events
glfwWaitEvents(); // VR headest issues
glfwWaitEventsTimeout(0.02); // VR headest issues
//glfwPollEvents();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment