diff --git a/scripts/generate_oxr_ext_support.py b/scripts/generate_oxr_ext_support.py index ce21a21e7..e4918bfd9 100755 --- a/scripts/generate_oxr_ext_support.py +++ b/scripts/generate_oxr_ext_support.py @@ -65,6 +65,7 @@ EXTENSIONS = ( ['XR_MNDX_ball_on_a_stick_controller'], ['XR_MNDX_egl_enable', 'XR_USE_PLATFORM_EGL', 'XR_USE_GRAPHICS_API_OPENGL'], ['XR_MNDX_force_feedback_curl'], + ['XR_MNDX_hydra'], ) diff --git a/src/external/openxr_includes/openxr/XR_MNDX_ball_on_a_stick_controller.h b/src/external/openxr_includes/openxr/XR_MNDX_ball_on_a_stick_controller.h new file mode 100644 index 000000000..bd0c2619c --- /dev/null +++ b/src/external/openxr_includes/openxr/XR_MNDX_ball_on_a_stick_controller.h @@ -0,0 +1,26 @@ +// Copyright 2023, Collabora, Ltd. +// SPDX-License-Identifier: BSL-1.0 +/*! + * @file + * @brief Preview header for XR_MNDX_ball_on_a_stick_controller extension + * @author Korcan Hussein + * @ingroup external_openxr + */ +#ifndef XR_MNDX_BALL_ON_A_STICK_CONTROLLER_H +#define XR_MNDX_BALL_ON_A_STICK_CONTROLLER_H 1 + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#define XR_MNDX_ball_on_a_stick_controller 1 +#define XR_MNDX_ball_on_a_stick_controller_SPEC_VERSION 1 +#define XR_MNDX_BALL_ON_A_STICK_CONTROLLER_EXTENSION_NAME "XR_MNDX_ball_on_a_stick_controller" + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/external/openxr_includes/openxr/XR_MNDX_hydra.h b/src/external/openxr_includes/openxr/XR_MNDX_hydra.h new file mode 100644 index 000000000..dfb7db0f1 --- /dev/null +++ b/src/external/openxr_includes/openxr/XR_MNDX_hydra.h @@ -0,0 +1,26 @@ +// Copyright 2023, Collabora, Ltd. +// SPDX-License-Identifier: BSL-1.0 +/*! + * @file + * @brief Preview header for XR_MNDX_hydra extension + * @author Korcan Hussein + * @ingroup external_openxr + */ +#ifndef XR_MNDX_HYDRA_H +#define XR_MNDX_HYDRA_H 1 + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#define XR_MNDX_hydra 1 +#define XR_MNDX_hydra_SPEC_VERSION 1 +#define XR_MNDX_HYDRA_EXTENSION_NAME "XR_MNDX_hydra" + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/xrt/include/xrt/xrt_openxr_includes.h b/src/xrt/include/xrt/xrt_openxr_includes.h index 752c25078..cd0b34688 100644 --- a/src/xrt/include/xrt/xrt_openxr_includes.h +++ b/src/xrt/include/xrt/xrt_openxr_includes.h @@ -1,9 +1,10 @@ -// Copyright 2018-2022, Collabora, Ltd. +// Copyright 2018-2023, Collabora, Ltd. // SPDX-License-Identifier: BSL-1.0 /*! * @file * @brief Include all of the openxr headers in one place. * @author Jakob Bornecrantz + * @author Korcan Hussein * @ingroup xrt_iface */ @@ -48,3 +49,6 @@ typedef __eglMustCastToProperFunctionPointerType (*PFNEGLGETPROCADDRESSPROC)(con #include "openxr/openxr.h" #include "openxr/openxr_platform.h" #include "openxr/loader_interfaces.h" + +#include "openxr/XR_MNDX_hydra.h" +#include "openxr/XR_MNDX_ball_on_a_stick_controller.h" diff --git a/src/xrt/state_trackers/oxr/oxr_extension_support.h b/src/xrt/state_trackers/oxr/oxr_extension_support.h index c75b84c38..1c7615fd6 100644 --- a/src/xrt/state_trackers/oxr/oxr_extension_support.h +++ b/src/xrt/state_trackers/oxr/oxr_extension_support.h @@ -1,4 +1,4 @@ -// Copyright 2019-2022, Collabora, Ltd. +// Copyright 2019-2023, Collabora, Ltd. // SPDX-License-Identifier: BSL-1.0 /*! * @file @@ -382,6 +382,17 @@ #define OXR_EXTENSION_SUPPORT_MNDX_force_feedback_curl(_) #endif + +/* + * XR_MNDX_hydra + */ +#if defined(XR_MNDX_hydra) +#define OXR_HAVE_MNDX_hydra +#define OXR_EXTENSION_SUPPORT_MNDX_hydra(_) _(MNDX_hydra, MNDX_HYDRA) +#else +#define OXR_EXTENSION_SUPPORT_MNDX_hydra(_) +#endif + // end of GENERATED per-extension defines - do not modify - used by scripts /*! @@ -437,5 +448,6 @@ OXR_EXTENSION_SUPPORT_EXTX_overlay(_) \ OXR_EXTENSION_SUPPORT_MNDX_ball_on_a_stick_controller(_) \ OXR_EXTENSION_SUPPORT_MNDX_egl_enable(_) \ - OXR_EXTENSION_SUPPORT_MNDX_force_feedback_curl(_) + OXR_EXTENSION_SUPPORT_MNDX_force_feedback_curl(_) \ + OXR_EXTENSION_SUPPORT_MNDX_hydra(_) // clang-format on