summaryrefslogtreecommitdiffstats
path: root/modules/openxr/register_types.cpp
diff options
context:
space:
mode:
authorBastiaan Olij <mux213@gmail.com>2023-06-08 12:05:20 +1000
committerFredia Huya-Kouadio <fhuya@meta.com>2023-10-02 14:02:23 -0700
commit9e56e7a3ceabc5c65e9ae749be5981eb61b49370 (patch)
treecdd21478ae448ca1f30b5924041d7e493d9f05f8 /modules/openxr/register_types.cpp
parenta2f90d565ad29edcb3bdab77bc7df51cdde8514a (diff)
downloadredot-engine-9e56e7a3ceabc5c65e9ae749be5981eb61b49370.tar.gz
Add support for the OpenXR Eye gaze interaction extension
Co-authored-by: Bastiaan Olij <mux213@gmail.com>
Diffstat (limited to 'modules/openxr/register_types.cpp')
-rw-r--r--modules/openxr/register_types.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/openxr/register_types.cpp b/modules/openxr/register_types.cpp
index d69c803502..09a064b9a9 100644
--- a/modules/openxr/register_types.cpp
+++ b/modules/openxr/register_types.cpp
@@ -42,6 +42,7 @@
#include "scene/openxr_hand.h"
#include "extensions/openxr_composition_layer_depth_extension.h"
+#include "extensions/openxr_eye_gaze_interaction.h"
#include "extensions/openxr_fb_display_refresh_rate_extension.h"
#include "extensions/openxr_fb_passthrough_extension_wrapper.h"
#include "extensions/openxr_hand_tracking_extension.h"
@@ -104,6 +105,9 @@ void initialize_openxr_module(ModuleInitializationLevel p_level) {
#endif
// register our other extensions
+ if (GLOBAL_GET("xr/openxr/extensions/eye_gaze_interaction") && (!OS::get_singleton()->has_feature("mobile") || OS::get_singleton()->has_feature(XR_EXT_EYE_GAZE_INTERACTION_EXTENSION_NAME))) {
+ OpenXRAPI::register_extension_wrapper(memnew(OpenXREyeGazeInteractionExtension));
+ }
OpenXRAPI::register_extension_wrapper(memnew(OpenXRPalmPoseExtension));
OpenXRAPI::register_extension_wrapper(memnew(OpenXRPicoControllerExtension));
OpenXRAPI::register_extension_wrapper(memnew(OpenXRCompositionLayerDepthExtension));