summaryrefslogtreecommitdiffstats
path: root/modules/openxr/openxr_api.h
diff options
context:
space:
mode:
Diffstat (limited to 'modules/openxr/openxr_api.h')
-rw-r--r--modules/openxr/openxr_api.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/modules/openxr/openxr_api.h b/modules/openxr/openxr_api.h
index f9d2e60148..748ef3af94 100644
--- a/modules/openxr/openxr_api.h
+++ b/modules/openxr/openxr_api.h
@@ -165,8 +165,16 @@ private:
XrSpace view_space = XR_NULL_HANDLE;
XRPose::TrackingConfidence head_pose_confidence = XRPose::XR_TRACKING_CONFIDENCE_NONE;
- bool emulating_local_floor = false;
- bool should_reset_emulated_floor_height = false;
+ // When LOCAL_FLOOR isn't supported, we use an approach based on the example code in the
+ // OpenXR spec in order to emulate it.
+ // See: https://registry.khronos.org/OpenXR/specs/1.0/html/xrspec.html#XR_EXT_local_floor
+ struct LocalFloorEmulation {
+ bool enabled = false;
+ XrSpace local_space = XR_NULL_HANDLE;
+ XrSpace stage_space = XR_NULL_HANDLE;
+ bool should_reset_floor_height = false;
+ } local_floor_emulation;
+
bool reset_emulated_floor_height();
bool load_layer_properties();