summaryrefslogtreecommitdiffstats
path: root/modules/openxr/openxr_api.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-08-20 11:03:54 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-08-20 11:03:54 +0200
commitd9e458515bd7c65b15d40adb22c6a76bbd722d45 (patch)
tree08d6f47bed8a8ff65a970863a00d13f1a9c2e778 /modules/openxr/openxr_api.cpp
parent8dfb8efaa9c2461306da408ea7cb087ee6bcb0a9 (diff)
parentd9ab2c3195de9bee5e834f38250fdc7b61314d7c (diff)
downloadredot-engine-d9e458515bd7c65b15d40adb22c6a76bbd722d45.tar.gz
Merge pull request #91750 from BastiaanOlij/openxr_visibility_mask
OpenXR: Add support for visibility mask
Diffstat (limited to 'modules/openxr/openxr_api.cpp')
-rw-r--r--modules/openxr/openxr_api.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/modules/openxr/openxr_api.cpp b/modules/openxr/openxr_api.cpp
index c6fd20dac7..db5c04fdef 100644
--- a/modules/openxr/openxr_api.cpp
+++ b/modules/openxr/openxr_api.cpp
@@ -1459,6 +1459,10 @@ void OpenXRAPI::set_form_factor(XrFormFactor p_form_factor) {
form_factor = p_form_factor;
}
+uint32_t OpenXRAPI::get_view_count() {
+ return view_count;
+}
+
void OpenXRAPI::set_view_configuration(XrViewConfigurationType p_view_configuration) {
ERR_FAIL_COND(is_initialized());
@@ -1914,15 +1918,6 @@ bool OpenXRAPI::poll_events() {
// We probably didn't poll fast enough, just output warning
WARN_PRINT("OpenXR EVENT: " + itos(event->lostEventCount) + " event data lost!");
} break;
- case XR_TYPE_EVENT_DATA_VISIBILITY_MASK_CHANGED_KHR: {
- // XrEventDataVisibilityMaskChangedKHR *event = (XrEventDataVisibilityMaskChangedKHR *)&runtimeEvent;
-
- // TODO implement this in the future, we should call xrGetVisibilityMaskKHR to obtain a mask,
- // this will allow us to prevent rendering the part of our view which is never displayed giving us
- // a decent performance improvement.
-
- print_verbose("OpenXR EVENT: STUB: visibility mask changed");
- } break;
case XR_TYPE_EVENT_DATA_INSTANCE_LOSS_PENDING: {
XrEventDataInstanceLossPending *event = (XrEventDataInstanceLossPending *)&runtimeEvent;