summaryrefslogtreecommitdiffstats
path: root/modules/openxr/openxr_api.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/openxr/openxr_api.cpp')
-rw-r--r--modules/openxr/openxr_api.cpp27
1 files changed, 13 insertions, 14 deletions
diff --git a/modules/openxr/openxr_api.cpp b/modules/openxr/openxr_api.cpp
index 2bd5376b21..a66afee1c5 100644
--- a/modules/openxr/openxr_api.cpp
+++ b/modules/openxr/openxr_api.cpp
@@ -216,7 +216,7 @@ bool OpenXRAPI::is_extension_enabled(const String &p_extension) const {
}
bool OpenXRAPI::is_top_level_path_supported(const String &p_toplevel_path) {
- String required_extension = OpenXRInteractionProfileMetaData::get_singleton()->get_top_level_extension(p_toplevel_path);
+ String required_extension = OpenXRInteractionProfileMetadata::get_singleton()->get_top_level_extension(p_toplevel_path);
// If unsupported is returned we likely have a misspelled interaction profile path in our action map. Always output that as an error.
ERR_FAIL_COND_V_MSG(required_extension == XR_PATH_UNSUPPORTED_NAME, false, "OpenXR: Unsupported toplevel path " + p_toplevel_path);
@@ -236,7 +236,7 @@ bool OpenXRAPI::is_top_level_path_supported(const String &p_toplevel_path) {
}
bool OpenXRAPI::is_interaction_profile_supported(const String &p_ip_path) {
- String required_extension = OpenXRInteractionProfileMetaData::get_singleton()->get_interaction_profile_extension(p_ip_path);
+ String required_extension = OpenXRInteractionProfileMetadata::get_singleton()->get_interaction_profile_extension(p_ip_path);
// If unsupported is returned we likely have a misspelled interaction profile path in our action map. Always output that as an error.
ERR_FAIL_COND_V_MSG(required_extension == XR_PATH_UNSUPPORTED_NAME, false, "OpenXR: Unsupported interaction profile " + p_ip_path);
@@ -260,9 +260,9 @@ bool OpenXRAPI::interaction_profile_supports_io_path(const String &p_ip_path, co
return false;
}
- const OpenXRInteractionProfileMetaData::IOPath *io_path = OpenXRInteractionProfileMetaData::get_singleton()->get_io_path(p_ip_path, p_io_path);
+ const OpenXRInteractionProfileMetadata::IOPath *io_path = OpenXRInteractionProfileMetadata::get_singleton()->get_io_path(p_ip_path, p_io_path);
- // If the io_path is not part of our meta data we've likely got a misspelled name or a bad action map, report
+ // If the io_path is not part of our metadata we've likely got a misspelled name or a bad action map, report
ERR_FAIL_NULL_V_MSG(io_path, false, "OpenXR: Unsupported io path " + String(p_ip_path) + String(p_io_path));
if (io_path->openxr_extension_name == "") {
@@ -300,32 +300,31 @@ bool OpenXRAPI::create_instance() {
for (OpenXRExtensionWrapper *wrapper : registered_extension_wrappers) {
const HashMap<String, bool *> &wrapper_request_extensions = wrapper->get_requested_extensions();
- // requested_extensions.insert(wrapper_request_extensions.begin(), wrapper_request_extensions.end());
- for (auto &requested_extension : wrapper_request_extensions) {
+ for (const KeyValue<String, bool *> &requested_extension : wrapper_request_extensions) {
requested_extensions[requested_extension.key] = requested_extension.value;
}
}
- // Check which extensions are supported
+ // Check which extensions are supported.
enabled_extensions.clear();
- for (auto &requested_extension : requested_extensions) {
+ for (KeyValue<String, bool *> &requested_extension : requested_extensions) {
if (!is_extension_supported(requested_extension.key)) {
if (requested_extension.value == nullptr) {
- // nullptr means this is a manditory extension so we fail
+ // Null means this is a manditory extension so we fail.
ERR_FAIL_V_MSG(false, String("OpenXR: OpenXR Runtime does not support ") + requested_extension.key + String(" extension!"));
} else {
- // set this extension as not supported
+ // Set this extension as not supported.
*requested_extension.value = false;
}
} else if (requested_extension.value != nullptr) {
- // set this extension as supported
+ // Set this extension as supported.
*requested_extension.value = true;
- // and record that we want to enable it
+ // And record that we want to enable it.
enabled_extensions.push_back(requested_extension.key.ascii());
} else {
- // record that we want to enable this
+ // Record that we want to enable this.
enabled_extensions.push_back(requested_extension.key.ascii());
}
}
@@ -2077,7 +2076,7 @@ XRPose::TrackingConfidence _transform_from_location(const T &p_location, Transfo
Basis basis;
Vector3 origin;
XRPose::TrackingConfidence confidence = XRPose::XR_TRACKING_CONFIDENCE_NONE;
- const auto &pose = p_location.pose;
+ const XrPosef &pose = p_location.pose;
// Check orientation
if (p_location.locationFlags & XR_SPACE_LOCATION_ORIENTATION_VALID_BIT) {