move render thread to App class and add ui thread with ui tasks queue

This commit is contained in:
2019-07-09 01:07:13 +02:00
parent f7ead8e157
commit cb6744be44
6 changed files with 239 additions and 194 deletions

View File

@@ -6,7 +6,6 @@
#ifdef _WIN32
bool win32_vr_start();
void win32_vr_stop();
void win32_render_thread_notify();
#endif
bool trigger_down = false;
@@ -86,9 +85,6 @@ void App::vr_update(float dt)
mouse_move(controller_cursor.x, controller_cursor.y, 1.f, kEventSource::Mouse, false);
async_end();
ui_inside = true;
#ifdef _WIN32
win32_render_thread_notify();
#endif
}
}
}
@@ -122,17 +118,11 @@ void App::vr_analog(const VRController& c, VRController::kButton b, VRController
{
mouse_down(0, controller_cursor.x, controller_cursor.y, 1.f, kEventSource::Mouse, false);
ui_capture = true;
#ifdef _WIN32
win32_render_thread_notify();
#endif
}
else
{
mouse_up(0, controller_cursor.x, controller_cursor.y, kEventSource::Mouse, false);
ui_capture = false;
#ifdef _WIN32
win32_render_thread_notify();
#endif
}
async_end();
}