1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

OpenXR: Change timing of xrWaitFrame and add thread safety features to OpenXR

This commit is contained in:
Bastiaan Olij
2024-03-21 18:58:24 +11:00
parent d282e4f0e6
commit cbab7dc049
19 changed files with 617 additions and 246 deletions

View File

@@ -1048,6 +1048,10 @@ public:
virtual void init() override;
virtual void finish() override;
virtual bool is_on_render_thread() override {
return Thread::get_caller_id() == server_thread;
}
virtual void call_on_render_thread(const Callable &p_callable) override {
if (Thread::get_caller_id() == server_thread) {
command_queue.flush_if_pending();