st/oxr: Make interaction profiles a build time option

This commit is contained in:
Jakob Bornecrantz 2023-11-13 21:00:28 +00:00
parent 179c10c399
commit b7299ead15
4 changed files with 64 additions and 22 deletions

View file

@ -362,6 +362,32 @@ set(XRT_OXR_RUNTIME_SUFFIX monado CACHE STRING "OpenXR client library suffix")
# Most users won't touch these.
mark_as_advanced(XRT_MODULE_COMPOSITOR_MAIN XRT_MODULE_COMPOSITOR_NULL XRT_FEATURE_OPENXR)
# Interaction extension support.
if(NOT DEFINED XRT_FEATURE_OPENXR_INTERACTION_EXT_EYE_GAZE)
set(XRT_FEATURE_OPENXR_INTERACTION_EXT_EYE_GAZE ON)
endif()
if(NOT DEFINED XRT_FEATURE_OPENXR_INTERACTION_EXT_HAND)
set(XRT_FEATURE_OPENXR_INTERACTION_EXT_HAND ON)
endif()
if(NOT DEFINED XRT_FEATURE_OPENXR_INTERACTION_EXT_PALM_POSE)
set(XRT_FEATURE_OPENXR_INTERACTION_EXT_PALM_POSE OFF)
endif()
if(NOT DEFINED XRT_FEATURE_OPENXR_INTERACTION_ML2)
set(XRT_FEATURE_OPENXR_INTERACTION_ML2 ON)
endif()
if(NOT DEFINED XRT_FEATURE_OPENXR_INTERACTION_MNDX)
set(XRT_FEATURE_OPENXR_INTERACTION_MNDX ON)
endif()
if(NOT DEFINED XRT_FEATURE_OPENXR_INTERACTION_MSFT_HAND)
set(XRT_FEATURE_OPENXR_INTERACTION_MSFT_HAND OFF)
endif()
if(NOT DEFINED XRT_FEATURE_OPENXR_INTERACTION_OPPO)
set(XRT_FEATURE_OPENXR_INTERACTION_OPPO ON)
endif()
if(NOT DEFINED XRT_FEATURE_OPENXR_INTERACTION_WINMR)
set(XRT_FEATURE_OPENXR_INTERACTION_WINMR ON)
endif()
# Defaults for OpenXR layer support
if(NOT DEFINED XRT_FEATURE_OPENXR_LAYER_DEPTH)
set(XRT_FEATURE_OPENXR_LAYER_DEPTH ON)
@ -572,6 +598,14 @@ message(STATUS "# FEATURE_COLOR_LOG: ${XRT_FEATURE
message(STATUS "# FEATURE_DEBUG_GUI: ${XRT_FEATURE_DEBUG_GUI}")
message(STATUS "# FEATURE_OPENXR: ${XRT_FEATURE_OPENXR}")
message(STATUS "# FEATURE_OPENXR_DEBUG_UTILS: ${XRT_FEATURE_OPENXR_DEBUG_UTILS}")
message(STATUS "# FEATURE_OPENXR_INTERACTION_EXT_EYE_GAZE: ${XRT_FEATURE_OPENXR_INTERACTION_EXT_EYE_GAZE}")
message(STATUS "# FEATURE_OPENXR_INTERACTION_EXT_HAND: ${XRT_FEATURE_OPENXR_INTERACTION_EXT_HAND}")
message(STATUS "# FEATURE_OPENXR_INTERACTION_EXT_PALM_POSE: ${XRT_FEATURE_OPENXR_INTERACTION_EXT_PALM_POSE}")
message(STATUS "# FEATURE_OPENXR_INTERACTION_ML2: ${XRT_FEATURE_OPENXR_INTERACTION_ML2}")
message(STATUS "# FEATURE_OPENXR_INTERACTION_MNDX: ${XRT_FEATURE_OPENXR_INTERACTION_MNDX}")
message(STATUS "# FEATURE_OPENXR_INTERACTION_MSFT_HAND: ${XRT_FEATURE_OPENXR_INTERACTION_MSFT_HAND}")
message(STATUS "# FEATURE_OPENXR_INTERACTION_OPPO: ${XRT_FEATURE_OPENXR_INTERACTION_OPPO}")
message(STATUS "# FEATURE_OPENXR_INTERACTION_WINMR: ${XRT_FEATURE_OPENXR_INTERACTION_WINMR}")
message(STATUS "# FEATURE_OPENXR_LAYER_CUBE: ${XRT_FEATURE_OPENXR_LAYER_CUBE}")
message(STATUS "# FEATURE_OPENXR_LAYER_CYLINDER: ${XRT_FEATURE_OPENXR_LAYER_CYLINDER}")
message(STATUS "# FEATURE_OPENXR_LAYER_DEPTH: ${XRT_FEATURE_OPENXR_LAYER_DEPTH}")

View file

@ -55,27 +55,27 @@ EXTENSIONS = (
['XR_KHR_win32_convert_performance_counter_time', 'XR_USE_PLATFORM_WIN32'],
['XR_EXT_debug_utils', 'XRT_FEATURE_OPENXR_DEBUG_UTILS'],
['XR_EXT_dpad_binding'],
['XR_EXT_eye_gaze_interaction'],
['XR_EXT_hand_interaction'],
['XR_EXT_eye_gaze_interaction', 'XRT_FEATURE_OPENXR_INTERACTION_EXT_EYE_GAZE'],
['XR_EXT_hand_interaction', 'XRT_FEATURE_OPENXR_INTERACTION_EXT_HAND'],
['XR_EXT_hand_tracking'],
['XR_EXT_hp_mixed_reality_controller'],
['XR_EXT_hp_mixed_reality_controller', 'XRT_FEATURE_OPENXR_INTERACTION_WINMR'],
['XR_EXT_local_floor', 'XRT_FEATURE_OPENXR_SPACE_LOCAL_FLOOR'],
['XR_EXT_palm_pose', 'ALWAYS_DISABLED'],
['XR_EXT_samsung_odyssey_controller'],
['XR_EXT_palm_pose', 'XRT_FEATURE_OPENXR_INTERACTION_EXT_PALM_POSE'],
['XR_EXT_samsung_odyssey_controller', 'XRT_FEATURE_OPENXR_INTERACTION_WINMR'],
['XR_FB_display_refresh_rate'],
['XR_ML_ml2_controller_interaction'],
['XR_ML_ml2_controller_interaction', 'XRT_FEATURE_OPENXR_INTERACTION_ML2'],
['XR_MND_headless'],
['XR_MND_swapchain_usage_input_attachment_bit'],
['XR_MSFT_hand_interaction', 'ALWAYS_DISABLED'],
['XR_MSFT_hand_interaction', 'XRT_FEATURE_OPENXR_INTERACTION_MSFT_HAND'],
['XR_MSFT_unbounded_reference_space', 'XRT_FEATURE_OPENXR_SPACE_UNBOUNDED'],
['XR_OPPO_controller_interaction'],
['XR_OPPO_controller_interaction', 'XRT_FEATURE_OPENXR_INTERACTION_OPPO'],
['XR_EXTX_overlay'],
['XR_HTCX_vive_tracker_interaction', 'ALWAYS_DISABLED'],
['XR_MNDX_ball_on_a_stick_controller'],
['XR_MNDX_ball_on_a_stick_controller', 'XRT_FEATURE_OPENXR_INTERACTION_MNDX'],
['XR_MNDX_egl_enable', 'XR_USE_PLATFORM_EGL', 'XR_USE_GRAPHICS_API_OPENGL'],
['XR_MNDX_force_feedback_curl'],
['XR_MNDX_hydra'],
['XR_MNDX_system_buttons'],
['XR_MNDX_hydra', 'XRT_FEATURE_OPENXR_INTERACTION_MNDX'],
['XR_MNDX_system_buttons', 'XRT_FEATURE_OPENXR_INTERACTION_MNDX'],
)

View file

@ -29,6 +29,14 @@
#cmakedefine XRT_FEATURE_DEBUG_GUI
#cmakedefine XRT_FEATURE_OPENXR
#cmakedefine XRT_FEATURE_OPENXR_DEBUG_UTILS
#cmakedefine XRT_FEATURE_OPENXR_INTERACTION_EXT_EYE_GAZE
#cmakedefine XRT_FEATURE_OPENXR_INTERACTION_EXT_HAND
#cmakedefine XRT_FEATURE_OPENXR_INTERACTION_EXT_PALM_POSE
#cmakedefine XRT_FEATURE_OPENXR_INTERACTION_ML2
#cmakedefine XRT_FEATURE_OPENXR_INTERACTION_MNDX
#cmakedefine XRT_FEATURE_OPENXR_INTERACTION_MSFT_HAND
#cmakedefine XRT_FEATURE_OPENXR_INTERACTION_OPPO
#cmakedefine XRT_FEATURE_OPENXR_INTERACTION_WINMR
#cmakedefine XRT_FEATURE_OPENXR_LAYER_CUBE
#cmakedefine XRT_FEATURE_OPENXR_LAYER_CYLINDER
#cmakedefine XRT_FEATURE_OPENXR_LAYER_DEPTH

View file

@ -271,7 +271,7 @@
/*
* XR_EXT_eye_gaze_interaction
*/
#if defined(XR_EXT_eye_gaze_interaction)
#if defined(XR_EXT_eye_gaze_interaction) && defined(XRT_FEATURE_OPENXR_INTERACTION_EXT_EYE_GAZE)
#define OXR_HAVE_EXT_eye_gaze_interaction
#define OXR_EXTENSION_SUPPORT_EXT_eye_gaze_interaction(_) _(EXT_eye_gaze_interaction, EXT_EYE_GAZE_INTERACTION)
#else
@ -282,7 +282,7 @@
/*
* XR_EXT_hand_interaction
*/
#if defined(XR_EXT_hand_interaction)
#if defined(XR_EXT_hand_interaction) && defined(XRT_FEATURE_OPENXR_INTERACTION_EXT_HAND)
#define OXR_HAVE_EXT_hand_interaction
#define OXR_EXTENSION_SUPPORT_EXT_hand_interaction(_) _(EXT_hand_interaction, EXT_HAND_INTERACTION)
#else
@ -304,7 +304,7 @@
/*
* XR_EXT_hp_mixed_reality_controller
*/
#if defined(XR_EXT_hp_mixed_reality_controller)
#if defined(XR_EXT_hp_mixed_reality_controller) && defined(XRT_FEATURE_OPENXR_INTERACTION_WINMR)
#define OXR_HAVE_EXT_hp_mixed_reality_controller
#define OXR_EXTENSION_SUPPORT_EXT_hp_mixed_reality_controller(_) \
_(EXT_hp_mixed_reality_controller, EXT_HP_MIXED_REALITY_CONTROLLER)
@ -327,7 +327,7 @@
/*
* XR_EXT_palm_pose
*/
#if defined(XR_EXT_palm_pose) && defined(ALWAYS_DISABLED)
#if defined(XR_EXT_palm_pose) && defined(XRT_FEATURE_OPENXR_INTERACTION_EXT_PALM_POSE)
#define OXR_HAVE_EXT_palm_pose
#define OXR_EXTENSION_SUPPORT_EXT_palm_pose(_) _(EXT_palm_pose, EXT_PALM_POSE)
#else
@ -338,7 +338,7 @@
/*
* XR_EXT_samsung_odyssey_controller
*/
#if defined(XR_EXT_samsung_odyssey_controller)
#if defined(XR_EXT_samsung_odyssey_controller) && defined(XRT_FEATURE_OPENXR_INTERACTION_WINMR)
#define OXR_HAVE_EXT_samsung_odyssey_controller
#define OXR_EXTENSION_SUPPORT_EXT_samsung_odyssey_controller(_) \
_(EXT_samsung_odyssey_controller, EXT_SAMSUNG_ODYSSEY_CONTROLLER)
@ -361,7 +361,7 @@
/*
* XR_ML_ml2_controller_interaction
*/
#if defined(XR_ML_ml2_controller_interaction)
#if defined(XR_ML_ml2_controller_interaction) && defined(XRT_FEATURE_OPENXR_INTERACTION_ML2)
#define OXR_HAVE_ML_ml2_controller_interaction
#define OXR_EXTENSION_SUPPORT_ML_ml2_controller_interaction(_) \
_(ML_ml2_controller_interaction, ML_ML2_CONTROLLER_INTERACTION)
@ -396,7 +396,7 @@
/*
* XR_MSFT_hand_interaction
*/
#if defined(XR_MSFT_hand_interaction) && defined(ALWAYS_DISABLED)
#if defined(XR_MSFT_hand_interaction) && defined(XRT_FEATURE_OPENXR_INTERACTION_MSFT_HAND)
#define OXR_HAVE_MSFT_hand_interaction
#define OXR_EXTENSION_SUPPORT_MSFT_hand_interaction(_) _(MSFT_hand_interaction, MSFT_HAND_INTERACTION)
#else
@ -419,7 +419,7 @@
/*
* XR_OPPO_controller_interaction
*/
#if defined(XR_OPPO_controller_interaction)
#if defined(XR_OPPO_controller_interaction) && defined(XRT_FEATURE_OPENXR_INTERACTION_OPPO)
#define OXR_HAVE_OPPO_controller_interaction
#define OXR_EXTENSION_SUPPORT_OPPO_controller_interaction(_) _(OPPO_controller_interaction, OPPO_CONTROLLER_INTERACTION)
#else
@ -453,7 +453,7 @@
/*
* XR_MNDX_ball_on_a_stick_controller
*/
#if defined(XR_MNDX_ball_on_a_stick_controller)
#if defined(XR_MNDX_ball_on_a_stick_controller) && defined(XRT_FEATURE_OPENXR_INTERACTION_MNDX)
#define OXR_HAVE_MNDX_ball_on_a_stick_controller
#define OXR_EXTENSION_SUPPORT_MNDX_ball_on_a_stick_controller(_) \
_(MNDX_ball_on_a_stick_controller, MNDX_BALL_ON_A_STICK_CONTROLLER)
@ -487,7 +487,7 @@
/*
* XR_MNDX_hydra
*/
#if defined(XR_MNDX_hydra)
#if defined(XR_MNDX_hydra) && defined(XRT_FEATURE_OPENXR_INTERACTION_MNDX)
#define OXR_HAVE_MNDX_hydra
#define OXR_EXTENSION_SUPPORT_MNDX_hydra(_) _(MNDX_hydra, MNDX_HYDRA)
#else
@ -498,7 +498,7 @@
/*
* XR_MNDX_system_buttons
*/
#if defined(XR_MNDX_system_buttons)
#if defined(XR_MNDX_system_buttons) && defined(XRT_FEATURE_OPENXR_INTERACTION_MNDX)
#define OXR_HAVE_MNDX_system_buttons
#define OXR_EXTENSION_SUPPORT_MNDX_system_buttons(_) _(MNDX_system_buttons, MNDX_SYSTEM_BUTTONS)
#else