Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Kim <pk15950@gmail.com>2021-08-25 14:55:14 +0300
committerPeter Kim <pk15950@gmail.com>2021-08-25 14:59:53 +0300
commit940ba74024e57899e171c797240ce3fdebc87b16 (patch)
treee611f63753f7ef4fe980cca774caeebac55ba097
parentd6ace5a7bbc0782b684cfab4ca4269365dd29285 (diff)
XR: Improve "Invalid stage ref space" warning
Originally mentioned that absolute tracking was disabled, which is wrong because absolute tracking (skipping application of eye offsets) is always available, although it may not give the expected result of persistent tracking origins across sessions if the stage space is unavailable (hence the need for a warning). Now, the warning makes no mention of absolute tracking, instead informing the user that the local space fallback will be used and that they should define tracking bounds via the XR runtime if they wish to use the stage space.
-rw-r--r--intern/ghost/intern/GHOST_XrSession.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/intern/ghost/intern/GHOST_XrSession.cpp b/intern/ghost/intern/GHOST_XrSession.cpp
index 8b0320ef358..a08b2d6045a 100644
--- a/intern/ghost/intern/GHOST_XrSession.cpp
+++ b/intern/ghost/intern/GHOST_XrSession.cpp
@@ -148,13 +148,12 @@ static void create_reference_spaces(OpenXRSessionData &oxr, const GHOST_XrPose &
if (XR_FAILED(result)) {
/* One of the rare cases where we don't want to immediately throw an exception on failure,
- * since run-times are not required to support the stage reference space. Although we need the
- * stage reference space for absolute tracking, if the runtime doesn't support it then just
- * fallback to the local space. */
+ * since runtimes are not required to support the stage reference space. If the runtime
+ * doesn't support it then just fall back to the local space. */
if (result == XR_ERROR_REFERENCE_SPACE_UNSUPPORTED) {
printf(
- "Warning: XR runtime does not support stage reference space, disabling absolute "
- "tracking.\n");
+ "Warning: XR runtime does not support stage reference space, falling back to local "
+ "reference space.\n");
create_info.referenceSpaceType = XR_REFERENCE_SPACE_TYPE_LOCAL;
CHECK_XR(xrCreateReferenceSpace(oxr.session, &create_info, &oxr.reference_space),
@@ -172,8 +171,9 @@ static void create_reference_spaces(OpenXRSessionData &oxr, const GHOST_XrPose &
"Failed to get stage reference space bounds.");
if (extents.width == 0.0f || extents.height == 0.0f) {
printf(
- "Warning: Invalid stage reference space bounds, disabling absolute tracking. To enable "
- "absolute tracking, please define a tracking space via the XR runtime.\n");
+ "Warning: Invalid stage reference space bounds, falling back to local reference space. "
+ "To use the stage reference space, please define a tracking space via the XR "
+ "runtime.\n");
/* Fallback to local space. */
if (oxr.reference_space != XR_NULL_HANDLE) {