move render thread to App class and add ui thread with ui tasks queue
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user