Monado OpenXR Runtime
Loading...
Searching...
No Matches
oxr_resolver_for_profiles.h
Go to the documentation of this file.
1// Copyright 2026, NVIDIA CORPORATION.
2// SPDX-License-Identifier: BSL-1.0
3/*!
4 * @file
5 * @brief Resolve suggested profiles for a device.
6 * @ingroup oxr_main
7 */
8
9#pragma once
10
11#include "xrt/xrt_defines.h"
12
13#include "oxr_extension_support.h"
16
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
22
23/*!
24 * Short-lived result of choosing a suggested profile for one subaction slot
25 * (for example `/user/hand/left`), plus any rebinding or device fallback needed
26 * to apply it.
27 */
29{
30 /*!
31 * The suggested profile to bind for, if no matching profile is found,
32 * no rebinding or fallback is found this and all other fields will be
33 * NULL.
34 */
36
37 /*!
38 * Runtime binding profile for @ref profile.
39 */
41
42 /*!
43 * If the device is not the same as the profile, this will be set to the
44 * rebinding profile that applies to the device. If no rebinding profile is
45 * found, this will be NULL.
46 */
48
49 /*!
50 * Runtime binding profile targeted by @ref rebinding_profile.
51 */
53
54 /*!
55 * If the device is not the same as the profile, and no rebinding
56 * profile the code will look for a fallback on the device and set this
57 * to the fallback binding profile.
58 */
59 const struct xrt_binding_profile *xbp;
60};
61
62/*!
63 * Resolve the binding information for a given device.
64 *
65 * @param log Logger, must not be NULL.
66 * @param slog Sink logger, must not be NULL.
67 * @param registry Binding registry, must not be NULL.
68 * @param suggested_profiles Suggested profiles, must not be NULL.
69 * @param xdev Device, must not be NULL.
70 * @param override_device_name Profile name to prefer before @p xdev->name, can be XRT_DEVICE_INVALID.
71 * @param info Binding information, must not be NULL.
72 */
73XRT_NONNULL_ALL void
75 struct oxr_sink_logger *slog,
76 const struct oxr_binding_registry *registry,
77 const struct oxr_suggested_profile_array *suggested_profiles,
78 struct xrt_device *xdev,
79 enum xrt_device_name override_device_name,
80 struct oxr_profile_resolver_info *info);
81
82
83#ifdef __cplusplus
84}
85#endif
Forward declarations for OpenXR state tracker structs.
XRT_NONNULL_ALL void oxr_resolver_populate_profile(struct oxr_logger *log, struct oxr_sink_logger *slog, const struct oxr_binding_registry *registry, const struct oxr_suggested_profile_array *suggested_profiles, struct xrt_device *xdev, enum xrt_device_name override_device_name, struct oxr_profile_resolver_info *info)
Resolve the binding information for a given device.
Definition oxr_resolver_for_profiles.c:218
Holds suggested profile array related functions.
Runtime interaction profile binding data cloned from generated templates.
Definition oxr_binding_profile.h:26
Complete runtime binding registry for all action contexts of an XrInstance.
Definition oxr_binding_registry.h:35
Logger struct that lives on the stack, one for each call client call.
Definition oxr_logger.h:44
Short-lived result of choosing a suggested profile for one subaction slot (for example /user/hand/lef...
Definition oxr_resolver_for_profiles.h:29
const struct oxr_binding_profile * binding_profile
Runtime binding profile for profile.
Definition oxr_resolver_for_profiles.h:40
const struct oxr_suggested_profile * profile
The suggested profile to bind for, if no matching profile is found, no rebinding or fallback is found...
Definition oxr_resolver_for_profiles.h:35
const struct oxr_rebinding_profile * rebinding_profile
If the device is not the same as the profile, this will be set to the rebinding profile that applies ...
Definition oxr_resolver_for_profiles.h:47
const struct xrt_binding_profile * xbp
If the device is not the same as the profile, and no rebinding profile the code will look for a fallb...
Definition oxr_resolver_for_profiles.h:59
const struct oxr_binding_profile * rebinding_target_profile
Runtime binding profile targeted by rebinding_profile.
Definition oxr_resolver_for_profiles.h:52
Maps binding paths from one interaction profile onto another.
Definition oxr_rebinding_profile.h:41
Allocate on the stack, make sure to zero initialize.
Definition oxr_logger.h:92
Manages an array of suggested profiles, does not have a init function but must be zero initialized wh...
Definition oxr_suggested_profile_array.h:30
Client-suggested bindings for one OpenXR interaction profile.
Definition oxr_suggested_profile.h:58
A binding profile, has lists of binding pairs to goes from device in name to the device it hangs off ...
Definition xrt_device.h:278
A single HMD or input device.
Definition xrt_device.h:357
Common defines and enums for XRT.
xrt_device_name
A enum that is used to name devices so that the state trackers can reason about the devices easier.
Definition xrt_defines.h:758