mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-28 02:26:16 +00:00
st/oxr: Add XR_OPPO_controller_interaction extension
This commit is contained in:
parent
191e7d6269
commit
6aea10f57b
|
@ -64,6 +64,7 @@ EXTENSIONS = (
|
|||
['XR_MND_headless'],
|
||||
['XR_MND_swapchain_usage_input_attachment_bit'],
|
||||
['XR_MSFT_hand_interaction', 'ALWAYS_DISABLED'],
|
||||
['XR_OPPO_controller_interaction'],
|
||||
['XR_EXTX_overlay'],
|
||||
['XR_HTCX_vive_tracker_interaction', 'ALWAYS_DISABLED'],
|
||||
['XR_MNDX_ball_on_a_stick_controller'],
|
||||
|
|
|
@ -315,6 +315,17 @@ oxr_xrSuggestInteractionProfileBindings(XrInstance instance,
|
|||
subpath_fn = oxr_verify_ext_hand_interaction_ext_subpath;
|
||||
dpad_path_fn = oxr_verify_ext_hand_interaction_ext_dpad_path;
|
||||
dpad_emulator_fn = oxr_verify_ext_hand_interaction_ext_dpad_emulator;
|
||||
} else if (ip == inst->path_cache.oppo_mr_controller) {
|
||||
if (!inst->extensions.OPPO_controller_interaction) {
|
||||
return oxr_error(&log, XR_ERROR_PATH_UNSUPPORTED,
|
||||
"(suggestedBindings->interactionProfile == \"%s\") used but "
|
||||
"XR_OPPO_controller_interaction not enabled",
|
||||
ip_str);
|
||||
}
|
||||
|
||||
subpath_fn = oxr_verify_oppo_mr_controller_oppo_subpath;
|
||||
dpad_path_fn = oxr_verify_oppo_mr_controller_oppo_dpad_path;
|
||||
dpad_emulator_fn = oxr_verify_oppo_mr_controller_oppo_dpad_emulator;
|
||||
} else {
|
||||
return oxr_error(&log, XR_ERROR_PATH_UNSUPPORTED,
|
||||
"(suggestedBindings->interactionProfile == \"%s\") is not "
|
||||
|
|
|
@ -337,6 +337,7 @@ get_profile_for_device_name(struct oxr_logger *log,
|
|||
case XRT_DEVICE_ML2_CONTROLLER: FIND_PROFILE(ml_ml2_controller); return;
|
||||
case XRT_DEVICE_HAND_INTERACTION: FIND_PROFILE(msft_hand_interaction); return;
|
||||
case XRT_DEVICE_EYE_GAZE_INTERACTION: FIND_PROFILE(ext_eye_gaze_interaction); return;
|
||||
case XRT_DEVICE_OPPO_MR_CONTROLLER: FIND_PROFILE(oppo_mr_controller); return;
|
||||
|
||||
// no interaction
|
||||
default:
|
||||
|
|
|
@ -371,6 +371,17 @@
|
|||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* XR_OPPO_controller_interaction
|
||||
*/
|
||||
#if defined(XR_OPPO_controller_interaction)
|
||||
#define OXR_HAVE_OPPO_controller_interaction
|
||||
#define OXR_EXTENSION_SUPPORT_OPPO_controller_interaction(_) _(OPPO_controller_interaction, OPPO_CONTROLLER_INTERACTION)
|
||||
#else
|
||||
#define OXR_EXTENSION_SUPPORT_OPPO_controller_interaction(_)
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* XR_EXTX_overlay
|
||||
*/
|
||||
|
@ -493,6 +504,7 @@
|
|||
OXR_EXTENSION_SUPPORT_MND_headless(_) \
|
||||
OXR_EXTENSION_SUPPORT_MND_swapchain_usage_input_attachment_bit(_) \
|
||||
OXR_EXTENSION_SUPPORT_MSFT_hand_interaction(_) \
|
||||
OXR_EXTENSION_SUPPORT_OPPO_controller_interaction(_) \
|
||||
OXR_EXTENSION_SUPPORT_EXTX_overlay(_) \
|
||||
OXR_EXTENSION_SUPPORT_HTCX_vive_tracker_interaction(_) \
|
||||
OXR_EXTENSION_SUPPORT_MNDX_ball_on_a_stick_controller(_) \
|
||||
|
|
|
@ -241,6 +241,7 @@ oxr_instance_create(struct oxr_logger *log,
|
|||
cache_path(log, inst, "/interaction_profiles/microsoft/hand_interaction", &inst->path_cache.msft_hand_interaction);
|
||||
cache_path(log, inst, "/interaction_profiles/ext/eye_gaze_interaction", &inst->path_cache.ext_eye_gaze_interaction);
|
||||
cache_path(log, inst, "/interaction_profiles/ext/hand_interaction_ext", &inst->path_cache.ext_hand_interaction);
|
||||
cache_path(log, inst, "/interaction_profiles/oppo/mr_controller_oppo", &inst->path_cache.oppo_mr_controller);
|
||||
|
||||
// clang-format on
|
||||
|
||||
|
|
|
@ -1368,6 +1368,7 @@ struct oxr_instance
|
|||
XrPath msft_hand_interaction;
|
||||
XrPath ext_eye_gaze_interaction;
|
||||
XrPath ext_hand_interaction;
|
||||
XrPath oppo_mr_controller;
|
||||
} path_cache;
|
||||
|
||||
struct
|
||||
|
|
Loading…
Reference in a new issue