Monado OpenXR Runtime
Loading...
Searching...
No Matches
oxr_binding_point_store.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 Store of generated binding point source paths.
6 * @ingroup oxr_main
7 */
8
9#pragma once
10
11#include "xrt/xrt_defines.h"
12
13#include "oxr_extension_support.h"
15
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
21/*!
22 * Store mapping interaction-profile/binding-path pairs to unique source paths.
23 *
24 * OpenXR returns source paths from xrEnumerateBoundSourcesForAction, and later
25 * accepts those same source paths in xrGetInputSourceLocalizedName. The binding
26 * registry may contain the same binding path under multiple interaction
27 * profiles, so this store assigns a generated unique path to each
28 * (interaction profile path, binding path) pair.
29 *
30 * entries_by_pair maps the packed pair to the generated source path and binding
31 * point, while points_by_unique_path maps that generated source path back to
32 * the binding point for fast localized-name lookup.
33 */
35{
36 struct u_hashmap_int *entries_by_pair;
37 struct u_hashmap_int *points_by_unique_path;
38 uint32_t next_unique_index;
39};
40
41XRT_CHECK_RESULT XrResult
42oxr_binding_point_store_init(struct oxr_binding_point_store *store);
43
44void
45oxr_binding_point_store_fini(struct oxr_binding_point_store *store);
46
47XRT_CHECK_RESULT XrResult
48oxr_binding_point_store_add(struct oxr_binding_point_store *store,
49 XrPath interaction_profile_path,
50 XrPath binding_path,
51 struct oxr_path_store *path_store,
52 struct oxr_binding_point *binding_point,
53 XrPath *out_unique_path);
54
55bool
56oxr_binding_point_store_get(const struct oxr_binding_point_store *store,
57 XrPath unique_path,
58 const struct oxr_binding_point **out_binding_point);
59
60
61#ifdef __cplusplus
62}
63#endif
Forward declarations for OpenXR state tracker structs.
Store mapping interaction-profile/binding-path pairs to unique source paths.
Definition oxr_binding_point_store.h:35
Runtime description of one bindable path on an interaction profile.
Definition oxr_binding_point.h:103
Path store structure for managing path storage and lookup.
Definition oxr_path_store.h:31
A simple uint64_t key to a void pointer hashmap.
Definition u_hashmap.cpp:24
Common defines and enums for XRT.