summaryrefslogtreecommitdiffstats
path: root/modules/openxr/openxr_interface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/openxr/openxr_interface.cpp')
-rw-r--r--modules/openxr/openxr_interface.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/openxr/openxr_interface.cpp b/modules/openxr/openxr_interface.cpp
index fbbc61a91c..73ac529537 100644
--- a/modules/openxr/openxr_interface.cpp
+++ b/modules/openxr/openxr_interface.cpp
@@ -36,7 +36,8 @@
#include "extensions/openxr_eye_gaze_interaction.h"
#include "extensions/openxr_hand_interaction_extension.h"
-#include "thirdparty/openxr/include/openxr/openxr.h"
+
+#include <openxr/openxr.h>
void OpenXRInterface::_bind_methods() {
// lifecycle signals
@@ -651,6 +652,10 @@ bool OpenXRInterface::initialize() {
// make this our primary interface
xr_server->set_primary_interface(this);
+ // Register an additional output with the display server, so rendering won't
+ // be skipped if no windows are visible.
+ DisplayServer::get_singleton()->register_additional_output(this);
+
initialized = true;
return initialized;
@@ -674,6 +679,8 @@ void OpenXRInterface::uninitialize() {
}
}
+ DisplayServer::get_singleton()->unregister_additional_output(this);
+
initialized = false;
}