Update to openxr SDK 1.0.12 (#66)
* Update to openxr SDK 1.0.12 * Fix CI build
This commit is contained in:
Родитель
eeab27ae62
Коммит
d15a933d52
18
README.md
18
README.md
|
@ -28,8 +28,6 @@ or choose x64 platform when running on a Windows Desktop PC with the HoloLens 2
|
|||
|
||||
The [openxr_preview](https://github.com/microsoft/OpenXR-MixedReality/tree/master/openxr_preview) folder contains a set of [preview header files](https://github.com/microsoft/OpenXR-MixedReality/tree/master/openxr_preview/include/openxr) containing the following OpenXR extensions that are only available [in preview runtime](http://aka.ms/openxr-preview).
|
||||
|
||||
1. [XR_MSFT_controller_model_preview](https://microsoft.github.io/OpenXR-MixedReality/openxr_preview/specs/openxr.html#XR_MSFT_controller_model_preview)
|
||||
|
||||
1. [XR_MSFT_spatial_anchor_export_preview](https://microsoft.github.io/OpenXR-MixedReality/openxr_preview/specs/openxr.html#XR_MSFT_spatial_anchor_export_preview)
|
||||
|
||||
1. [XR_MSFT_perception_anchor_interop_preview](https://microsoft.github.io/OpenXR-MixedReality/openxr_preview/specs/openxr.html#XR_MSFT_perception_anchor_interop_preview)
|
||||
|
@ -49,8 +47,8 @@ captures a typical OpenXR app code flow for session initialization, event handli
|
|||
|
||||
- **Hand tracking** <br/>
|
||||
The [Scene_HandTracking.cpp](https://github.com/microsoft/OpenXR-MixedReality/blob/master/samples/SampleSceneUwp/Scene_HandTracking.cpp)
|
||||
demos the usage of [XR_EXT_hand_tracking](https://microsoft.github.io/OpenXR-MixedReality/openxr_preview/specs/openxr.html#XR_EXT_hand_tracking)
|
||||
and [XR_MSFT_hand_tracking_mesh](https://microsoft.github.io/OpenXR-MixedReality/openxr_preview/specs/openxr.html#XR_MSFT_hand_tracking_mesh) extensions.
|
||||
demos the usage of [XR_EXT_hand_tracking](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_EXT_hand_tracking)
|
||||
and [XR_MSFT_hand_tracking_mesh](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_MSFT_hand_tracking_mesh) extensions.
|
||||
|
||||
- **Eye tracking** <br/>
|
||||
The [Scene_EyeGazeInteraction.cpp](https://github.com/microsoft/OpenXR-MixedReality/blob/master/samples/EyeGazeInteractionUwp/Scene_EyeGazeInteraction.cpp) file
|
||||
|
@ -58,13 +56,13 @@ demos the usage of [XR_EXT_eye_gaze_interaction](https://www.khronos.org/registr
|
|||
|
||||
- **Mixed reality capture support** <br/>
|
||||
Search "secondary" in [XrApp.cpp](https://github.com/microsoft/OpenXR-MixedReality/blob/master/shared/XrSceneLib/XrApp.cpp) file
|
||||
to understand the usage of [XR_MSFT_secondary_view_configuration](https://microsoft.github.io/OpenXR-MixedReality/openxr_preview/specs/openxr.html#XR_MSFT_secondary_view_configuration)
|
||||
and [XR_MSFT_first_person_observer](https://microsoft.github.io/OpenXR-MixedReality/openxr_preview/specs/openxr.html#XR_MSFT_first_person_observer) extensions.
|
||||
to understand the usage of [XR_MSFT_secondary_view_configuration](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_MSFT_secondary_view_configuration)
|
||||
and [XR_MSFT_first_person_observer](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_MSFT_first_person_observer) extensions.
|
||||
|
||||
- **Render the motion controller model** <br/>
|
||||
The [ControllerObject.cpp](https://github.com/microsoft/OpenXR-MixedReality/blob/master/shared/XrSceneLib/ControllerObject.cpp) and
|
||||
[Scene_ControllerModel.cpp](https://github.com/microsoft/OpenXR-MixedReality/blob/master/samples/SampleSceneWin32/Scene_ControllerModel.cpp) files
|
||||
demos the usage of [XR_MSFT_controller_model_preview](https://microsoft.github.io/OpenXR-MixedReality/openxr_preview/specs/openxr.html#XR_MSFT_controller_model_preview) extension.
|
||||
demos the usage of [XR_MSFT_controller_model](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_MSFT_controller_model) extension.
|
||||
|
||||
- **Holographic window attachment** <br/>
|
||||
The [SampleSceneUwp/Main.cpp](https://github.com/microsoft/OpenXR-MixedReality/blob/master/samples/SampleSceneUwp/Main.cpp) file demos protocol activation for XR apps,
|
||||
|
@ -74,9 +72,9 @@ and [TextEditingContext](https://docs.microsoft.com/en-us/uwp/api/Windows.UI.Tex
|
|||
|
||||
- **Understand the local, unbounded and anchor spaces**<br/>
|
||||
The [ThreeSpacesUwp](https://github.com/microsoft/OpenXR-MixedReality/blob/master/samples/ThreeSpacesUwp/Scene_ThreeSpaces.cpp) project
|
||||
demos the usage and differences of [LOCAL](https://microsoft.github.io/OpenXR-MixedReality/openxr_preview/specs/openxr.html#reference-spaces),
|
||||
[UNBOUNDED](https://microsoft.github.io/OpenXR-MixedReality/openxr_preview/specs/openxr.html#XR_MSFT_unbounded_reference_space) reference spaces
|
||||
and [spatial anchors](https://microsoft.github.io/OpenXR-MixedReality/openxr_preview/specs/openxr.html#XR_MSFT_spatial_anchor).
|
||||
demos the usage and differences of [LOCAL](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#reference-spaces),
|
||||
[UNBOUNDED](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_MSFT_unbounded_reference_space) reference spaces
|
||||
and [spatial anchors](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_MSFT_spatial_anchor).
|
||||
|
||||
* The sample code for [XR_MSFT_spatial_graph_bridge](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_MSFT_spatial_graph_bridge) is coming soon ...
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ extern "C" {
|
|||
((((major) & 0xffffULL) << 48) | (((minor) & 0xffffULL) << 32) | ((patch) & 0xffffffffULL))
|
||||
|
||||
// OpenXR current version number.
|
||||
#define XR_CURRENT_API_VERSION XR_MAKE_VERSION(1, 0, 10)
|
||||
#define XR_CURRENT_API_VERSION XR_MAKE_VERSION(1, 0, 12)
|
||||
|
||||
#define XR_VERSION_MAJOR(version) (uint16_t)(((uint64_t)(version) >> 48)& 0xffffULL)
|
||||
#define XR_VERSION_MINOR(version) (uint16_t)(((uint64_t)(version) >> 32) & 0xffffULL)
|
||||
|
@ -180,12 +180,12 @@ typedef enum XrResult {
|
|||
XR_ERROR_ACTIONSETS_ALREADY_ATTACHED = -47,
|
||||
XR_ERROR_LOCALIZED_NAME_DUPLICATED = -48,
|
||||
XR_ERROR_LOCALIZED_NAME_INVALID = -49,
|
||||
XR_ERROR_GRAPHICS_REQUIREMENTS_CALL_MISSING = -50,
|
||||
XR_ERROR_ANDROID_THREAD_SETTINGS_ID_INVALID_KHR = -1000003000,
|
||||
XR_ERROR_ANDROID_THREAD_SETTINGS_FAILURE_KHR = -1000003001,
|
||||
XR_ERROR_CREATE_SPATIAL_ANCHOR_FAILED_MSFT = -1000039001,
|
||||
XR_ERROR_SECONDARY_VIEW_CONFIGURATION_TYPE_NOT_ENABLED_MSFT = -1000053000,
|
||||
XR_ERROR_CONTROLLER_MODEL_UNAVAILABLE_MSFT = -1000055000,
|
||||
XR_ERROR_CONTROLLER_MODEL_KEY_INVALID_MSFT = -1000055001,
|
||||
XR_ERROR_CONTROLLER_MODEL_KEY_INVALID_MSFT = -1000055000,
|
||||
XR_SPATIAL_ANCHOR_EXPORT_DATA_UNAVAILABLE_MSFT = 1000062000,
|
||||
XR_ERROR_SPATIAL_ANCHOR_EXPORT_FAILED_MSFT = -1000062000,
|
||||
XR_ERROR_SPATIAL_ANCHOR_SUFFICIENCY_QUERY_FAILED_MSFT = -1000062001,
|
||||
|
@ -278,6 +278,7 @@ typedef enum XrStructureType {
|
|||
XR_TYPE_EVENT_DATA_VISIBILITY_MASK_CHANGED_KHR = 1000031001,
|
||||
XR_TYPE_SESSION_CREATE_INFO_OVERLAY_EXTX = 1000033000,
|
||||
XR_TYPE_EVENT_DATA_MAIN_SESSION_VISIBILITY_CHANGED_EXTX = 1000033003,
|
||||
XR_TYPE_COMPOSITION_LAYER_COLOR_SCALE_BIAS_KHR = 1000034000,
|
||||
XR_TYPE_SPATIAL_ANCHOR_CREATE_INFO_MSFT = 1000039000,
|
||||
XR_TYPE_SPATIAL_ANCHOR_SPACE_CREATE_INFO_MSFT = 1000039001,
|
||||
XR_TYPE_VIEW_CONFIGURATION_DEPTH_RANGE_EXT = 1000046000,
|
||||
|
@ -299,16 +300,24 @@ typedef enum XrStructureType {
|
|||
XR_TYPE_SECONDARY_VIEW_CONFIGURATION_FRAME_END_INFO_MSFT = 1000053003,
|
||||
XR_TYPE_SECONDARY_VIEW_CONFIGURATION_LAYER_INFO_MSFT = 1000053004,
|
||||
XR_TYPE_SECONDARY_VIEW_CONFIGURATION_SWAPCHAIN_CREATE_INFO_MSFT = 1000053005,
|
||||
XR_TYPE_VIEW_CONFIGURATION_VIEW_FOV_EPIC = 1000059000,
|
||||
XR_TYPE_HOLOGRAPHIC_WINDOW_ATTACHMENT_MSFT = 1000063000,
|
||||
XR_TYPE_INTERACTION_PROFILE_ANALOG_THRESHOLD_VALVE = 1000079000,
|
||||
XR_TYPE_CONTROLLER_MODEL_KEY_STATE_MSFT = 1000055000,
|
||||
XR_TYPE_CONTROLLER_MODEL_NODE_PROPERTIES_MSFT = 1000055001,
|
||||
XR_TYPE_CONTROLLER_MODEL_PROPERTIES_MSFT = 1000055002,
|
||||
XR_TYPE_CONTROLLER_MODEL_NODE_STATE_MSFT = 1000055003,
|
||||
XR_TYPE_CONTROLLER_MODEL_STATE_MSFT = 1000055004,
|
||||
XR_TYPE_VIEW_CONFIGURATION_VIEW_FOV_EPIC = 1000059000,
|
||||
XR_TYPE_HOLOGRAPHIC_WINDOW_ATTACHMENT_MSFT = 1000063000,
|
||||
XR_TYPE_INTERACTION_PROFILE_ANALOG_THRESHOLD_VALVE = 1000079000,
|
||||
XR_TYPE_LOADER_INIT_INFO_ANDROID_KHR = 1000089000,
|
||||
XR_TYPE_VULKAN_INSTANCE_CREATE_INFO_KHR = 1000090000,
|
||||
XR_TYPE_VULKAN_DEVICE_CREATE_INFO_KHR = 1000090001,
|
||||
XR_TYPE_VULKAN_GRAPHICS_DEVICE_GET_INFO_KHR = 1000090003,
|
||||
XR_TYPE_COMPOSITION_LAYER_EQUIRECT2_KHR = 1000091000,
|
||||
XR_TYPE_SPATIAL_ANCHOR_EXPORT_PURPOSE_INFO_MSFT = 1000062000,
|
||||
XR_TYPE_SPATIAL_ANCHOR_EXPORT_SUFFICIENCY_MSFT = 1000062001,
|
||||
XR_TYPE_GRAPHICS_BINDING_VULKAN2_KHR = XR_TYPE_GRAPHICS_BINDING_VULKAN_KHR,
|
||||
XR_TYPE_SWAPCHAIN_IMAGE_VULKAN2_KHR = XR_TYPE_SWAPCHAIN_IMAGE_VULKAN_KHR,
|
||||
XR_TYPE_GRAPHICS_REQUIREMENTS_VULKAN2_KHR = XR_TYPE_GRAPHICS_REQUIREMENTS_VULKAN_KHR,
|
||||
XR_STRUCTURE_TYPE_MAX_ENUM = 0x7FFFFFFF
|
||||
} XrStructureType;
|
||||
|
||||
|
@ -1398,6 +1407,53 @@ XRAPI_ATTR XrResult XRAPI_CALL xrGetVisibilityMaskKHR(
|
|||
#endif
|
||||
|
||||
|
||||
#define XR_KHR_composition_layer_color_scale_bias 1
|
||||
#define XR_KHR_composition_layer_color_scale_bias_SPEC_VERSION 5
|
||||
#define XR_KHR_COMPOSITION_LAYER_COLOR_SCALE_BIAS_EXTENSION_NAME "XR_KHR_composition_layer_color_scale_bias"
|
||||
typedef struct XrCompositionLayerColorScaleBiasKHR {
|
||||
XrStructureType type;
|
||||
const void* XR_MAY_ALIAS next;
|
||||
XrColor4f colorScale;
|
||||
XrColor4f colorBias;
|
||||
} XrCompositionLayerColorScaleBiasKHR;
|
||||
|
||||
|
||||
|
||||
#define XR_KHR_loader_init 1
|
||||
#define XR_KHR_loader_init_SPEC_VERSION 1
|
||||
#define XR_KHR_LOADER_INIT_EXTENSION_NAME "XR_KHR_loader_init"
|
||||
typedef struct XR_MAY_ALIAS XrLoaderInitInfoBaseHeaderKHR {
|
||||
XrStructureType type;
|
||||
const void* XR_MAY_ALIAS next;
|
||||
} XrLoaderInitInfoBaseHeaderKHR;
|
||||
|
||||
typedef XrResult (XRAPI_PTR *PFN_xrInitializeLoaderKHR)(const XrLoaderInitInfoBaseHeaderKHR* loaderInitInfo);
|
||||
|
||||
#ifndef XR_NO_PROTOTYPES
|
||||
XRAPI_ATTR XrResult XRAPI_CALL xrInitializeLoaderKHR(
|
||||
const XrLoaderInitInfoBaseHeaderKHR* loaderInitInfo);
|
||||
#endif
|
||||
|
||||
|
||||
#define XR_KHR_composition_layer_equirect2 1
|
||||
#define XR_KHR_composition_layer_equirect2_SPEC_VERSION 1
|
||||
#define XR_KHR_COMPOSITION_LAYER_EQUIRECT2_EXTENSION_NAME "XR_KHR_composition_layer_equirect2"
|
||||
typedef struct XrCompositionLayerEquirect2KHR {
|
||||
XrStructureType type;
|
||||
const void* XR_MAY_ALIAS next;
|
||||
XrCompositionLayerFlags layerFlags;
|
||||
XrSpace space;
|
||||
XrEyeVisibility eyeVisibility;
|
||||
XrSwapchainSubImage subImage;
|
||||
XrPosef pose;
|
||||
float radius;
|
||||
float centralHorizontalAngle;
|
||||
float upperVerticalAngle;
|
||||
float lowerVerticalAngle;
|
||||
} XrCompositionLayerEquirect2KHR;
|
||||
|
||||
|
||||
|
||||
#define XR_EXT_performance_settings 1
|
||||
#define XR_EXT_performance_settings_SPEC_VERSION 1
|
||||
#define XR_EXT_PERFORMANCE_SETTINGS_EXTENSION_NAME "XR_EXT_performance_settings"
|
||||
|
@ -2009,15 +2065,13 @@ typedef struct XrSecondaryViewConfigurationSwapchainCreateInfoMSFT {
|
|||
#define XR_MSFT_FIRST_PERSON_OBSERVER_EXTENSION_NAME "XR_MSFT_first_person_observer"
|
||||
|
||||
|
||||
#define XR_MSFT_controller_model_preview 1
|
||||
#define XR_MSFT_controller_model 1
|
||||
|
||||
#define XR_NULL_CONTROLLER_MODEL_KEY_MSFT 0
|
||||
|
||||
|
||||
XR_DEFINE_ATOM(XrControllerModelKeyMSFT)
|
||||
|
||||
#define XR_MSFT_controller_model_preview_SPEC_VERSION 1
|
||||
#define XR_MSFT_CONTROLLER_MODEL_PREVIEW_EXTENSION_NAME "XR_MSFT_controller_model_preview"
|
||||
XR_DEFINE_ATOM(XrControllerModelKeyMSFT)
|
||||
#define XR_MSFT_controller_model_SPEC_VERSION 2
|
||||
#define XR_MSFT_CONTROLLER_MODEL_EXTENSION_NAME "XR_MSFT_controller_model"
|
||||
#define XR_MAX_CONTROLLER_MODEL_NODE_NAME_SIZE_MSFT 64
|
||||
typedef struct XrControllerModelKeyStateMSFT {
|
||||
XrStructureType type;
|
||||
|
@ -2055,7 +2109,7 @@ typedef struct XrControllerModelStateMSFT {
|
|||
} XrControllerModelStateMSFT;
|
||||
|
||||
typedef XrResult (XRAPI_PTR *PFN_xrGetControllerModelKeyMSFT)(XrSession session, XrPath topLevelUserPath, XrControllerModelKeyStateMSFT* controllerModelKeyState);
|
||||
typedef XrResult (XRAPI_PTR *PFN_xrLoadControllerModelMSFT)(XrSession session, XrControllerModelKeyMSFT modelKey, uint32_t sizeInput, uint32_t* sizeOutput, uint8_t* buffer);
|
||||
typedef XrResult (XRAPI_PTR *PFN_xrLoadControllerModelMSFT)(XrSession session, XrControllerModelKeyMSFT modelKey, uint32_t bufferCapacityInput, uint32_t* bufferCountOutput, uint8_t* buffer);
|
||||
typedef XrResult (XRAPI_PTR *PFN_xrGetControllerModelPropertiesMSFT)(XrSession session, XrControllerModelKeyMSFT modelKey, XrControllerModelPropertiesMSFT* properties);
|
||||
typedef XrResult (XRAPI_PTR *PFN_xrGetControllerModelStateMSFT)(XrSession session, XrControllerModelKeyMSFT modelKey, XrControllerModelStateMSFT* state);
|
||||
|
||||
|
@ -2068,8 +2122,8 @@ XRAPI_ATTR XrResult XRAPI_CALL xrGetControllerModelKeyMSFT(
|
|||
XRAPI_ATTR XrResult XRAPI_CALL xrLoadControllerModelMSFT(
|
||||
XrSession session,
|
||||
XrControllerModelKeyMSFT modelKey,
|
||||
uint32_t sizeInput,
|
||||
uint32_t* sizeOutput,
|
||||
uint32_t bufferCapacityInput,
|
||||
uint32_t* bufferCountOutput,
|
||||
uint8_t* buffer);
|
||||
|
||||
XRAPI_ATTR XrResult XRAPI_CALL xrGetControllerModelPropertiesMSFT(
|
||||
|
|
|
@ -75,7 +75,7 @@ typedef struct XrInstanceCreateInfoAndroidKHR {
|
|||
#ifdef XR_USE_GRAPHICS_API_VULKAN
|
||||
|
||||
#define XR_KHR_vulkan_swapchain_format_list 1
|
||||
#define XR_KHR_vulkan_swapchain_format_list_SPEC_VERSION 2
|
||||
#define XR_KHR_vulkan_swapchain_format_list_SPEC_VERSION 3
|
||||
#define XR_KHR_VULKAN_SWAPCHAIN_FORMAT_LIST_EXTENSION_NAME "XR_KHR_vulkan_swapchain_format_list"
|
||||
typedef struct XrVulkanSwapchainFormatListCreateInfoKHR {
|
||||
XrStructureType type;
|
||||
|
@ -89,7 +89,7 @@ typedef struct XrVulkanSwapchainFormatListCreateInfoKHR {
|
|||
#ifdef XR_USE_GRAPHICS_API_OPENGL
|
||||
|
||||
#define XR_KHR_opengl_enable 1
|
||||
#define XR_KHR_opengl_enable_SPEC_VERSION 8
|
||||
#define XR_KHR_opengl_enable_SPEC_VERSION 9
|
||||
#define XR_KHR_OPENGL_ENABLE_EXTENSION_NAME "XR_KHR_opengl_enable"
|
||||
#ifdef XR_USE_PLATFORM_WIN32
|
||||
typedef struct XrGraphicsBindingOpenGLWin32KHR {
|
||||
|
@ -159,7 +159,7 @@ XRAPI_ATTR XrResult XRAPI_CALL xrGetOpenGLGraphicsRequirementsKHR(
|
|||
#ifdef XR_USE_GRAPHICS_API_OPENGL_ES
|
||||
|
||||
#define XR_KHR_opengl_es_enable 1
|
||||
#define XR_KHR_opengl_es_enable_SPEC_VERSION 6
|
||||
#define XR_KHR_opengl_es_enable_SPEC_VERSION 7
|
||||
#define XR_KHR_OPENGL_ES_ENABLE_EXTENSION_NAME "XR_KHR_opengl_es_enable"
|
||||
#ifdef XR_USE_PLATFORM_ANDROID
|
||||
typedef struct XrGraphicsBindingOpenGLESAndroidKHR {
|
||||
|
@ -197,7 +197,7 @@ XRAPI_ATTR XrResult XRAPI_CALL xrGetOpenGLESGraphicsRequirementsKHR(
|
|||
#ifdef XR_USE_GRAPHICS_API_VULKAN
|
||||
|
||||
#define XR_KHR_vulkan_enable 1
|
||||
#define XR_KHR_vulkan_enable_SPEC_VERSION 6
|
||||
#define XR_KHR_vulkan_enable_SPEC_VERSION 7
|
||||
#define XR_KHR_VULKAN_ENABLE_EXTENSION_NAME "XR_KHR_vulkan_enable"
|
||||
typedef struct XrGraphicsBindingVulkanKHR {
|
||||
XrStructureType type;
|
||||
|
@ -258,7 +258,7 @@ XRAPI_ATTR XrResult XRAPI_CALL xrGetVulkanGraphicsRequirementsKHR(
|
|||
#ifdef XR_USE_GRAPHICS_API_D3D11
|
||||
|
||||
#define XR_KHR_D3D11_enable 1
|
||||
#define XR_KHR_D3D11_enable_SPEC_VERSION 4
|
||||
#define XR_KHR_D3D11_enable_SPEC_VERSION 5
|
||||
#define XR_KHR_D3D11_ENABLE_EXTENSION_NAME "XR_KHR_D3D11_enable"
|
||||
typedef struct XrGraphicsBindingD3D11KHR {
|
||||
XrStructureType type;
|
||||
|
@ -292,7 +292,7 @@ XRAPI_ATTR XrResult XRAPI_CALL xrGetD3D11GraphicsRequirementsKHR(
|
|||
#ifdef XR_USE_GRAPHICS_API_D3D12
|
||||
|
||||
#define XR_KHR_D3D12_enable 1
|
||||
#define XR_KHR_D3D12_enable_SPEC_VERSION 6
|
||||
#define XR_KHR_D3D12_enable_SPEC_VERSION 7
|
||||
#define XR_KHR_D3D12_ENABLE_EXTENSION_NAME "XR_KHR_D3D12_enable"
|
||||
typedef struct XrGraphicsBindingD3D12KHR {
|
||||
XrStructureType type;
|
||||
|
@ -366,6 +366,97 @@ XRAPI_ATTR XrResult XRAPI_CALL xrConvertTimeToTimespecTimeKHR(
|
|||
#endif
|
||||
#endif /* XR_USE_TIMESPEC */
|
||||
|
||||
#ifdef XR_USE_PLATFORM_ANDROID
|
||||
|
||||
#define XR_KHR_loader_init_android 1
|
||||
#define XR_KHR_loader_init_android_SPEC_VERSION 1
|
||||
#define XR_KHR_LOADER_INIT_ANDROID_EXTENSION_NAME "XR_KHR_loader_init_android"
|
||||
typedef struct XrLoaderInitInfoAndroidKHR {
|
||||
XrStructureType type;
|
||||
const void* XR_MAY_ALIAS next;
|
||||
void* XR_MAY_ALIAS applicationVM;
|
||||
void* XR_MAY_ALIAS applicationContext;
|
||||
} XrLoaderInitInfoAndroidKHR;
|
||||
|
||||
#endif /* XR_USE_PLATFORM_ANDROID */
|
||||
|
||||
#ifdef XR_USE_GRAPHICS_API_VULKAN
|
||||
|
||||
#define XR_KHR_vulkan_enable2 1
|
||||
#define XR_KHR_vulkan_enable2_SPEC_VERSION 1
|
||||
#define XR_KHR_VULKAN_ENABLE2_EXTENSION_NAME "XR_KHR_vulkan_enable2"
|
||||
typedef XrFlags64 XrVulkanInstanceCreateFlagsKHR;
|
||||
|
||||
// Flag bits for XrVulkanInstanceCreateFlagsKHR
|
||||
|
||||
typedef XrFlags64 XrVulkanDeviceCreateFlagsKHR;
|
||||
|
||||
// Flag bits for XrVulkanDeviceCreateFlagsKHR
|
||||
|
||||
typedef struct XrVulkanInstanceCreateInfoKHR {
|
||||
XrStructureType type;
|
||||
const void* XR_MAY_ALIAS next;
|
||||
XrSystemId systemId;
|
||||
XrVulkanInstanceCreateFlagsKHR createFlags;
|
||||
PFN_vkGetInstanceProcAddr pfnGetInstanceProcAddr;
|
||||
const VkInstanceCreateInfo* vulkanCreateInfo;
|
||||
const VkAllocationCallbacks* vulkanAllocator;
|
||||
} XrVulkanInstanceCreateInfoKHR;
|
||||
|
||||
typedef struct XrVulkanDeviceCreateInfoKHR {
|
||||
XrStructureType type;
|
||||
const void* XR_MAY_ALIAS next;
|
||||
XrSystemId systemId;
|
||||
XrVulkanDeviceCreateFlagsKHR createFlags;
|
||||
PFN_vkGetInstanceProcAddr pfnGetInstanceProcAddr;
|
||||
VkPhysicalDevice vulkanPhysicalDevice;
|
||||
const VkDeviceCreateInfo* vulkanCreateInfo;
|
||||
const VkAllocationCallbacks* vulkanAllocator;
|
||||
} XrVulkanDeviceCreateInfoKHR;
|
||||
|
||||
typedef XrGraphicsBindingVulkanKHR XrGraphicsBindingVulkan2KHR;
|
||||
|
||||
typedef struct XrVulkanGraphicsDeviceGetInfoKHR {
|
||||
XrStructureType type;
|
||||
const void* XR_MAY_ALIAS next;
|
||||
XrSystemId systemId;
|
||||
VkInstance vulkanInstance;
|
||||
} XrVulkanGraphicsDeviceGetInfoKHR;
|
||||
|
||||
typedef XrSwapchainImageVulkanKHR XrSwapchainImageVulkan2KHR;
|
||||
|
||||
typedef XrGraphicsRequirementsVulkanKHR XrGraphicsRequirementsVulkan2KHR;
|
||||
|
||||
typedef XrResult (XRAPI_PTR *PFN_xrCreateVulkanInstanceKHR)(XrInstance instance, const XrVulkanInstanceCreateInfoKHR*createInfo, VkInstance* vulkanInstance, VkResult* vulkanResult);
|
||||
typedef XrResult (XRAPI_PTR *PFN_xrCreateVulkanDeviceKHR)(XrInstance instance, const XrVulkanDeviceCreateInfoKHR* createInfo, VkDevice* vulkanDevice, VkResult* vulkanResult);
|
||||
typedef XrResult (XRAPI_PTR *PFN_xrGetVulkanGraphicsDevice2KHR)(XrInstance instance, const XrVulkanGraphicsDeviceGetInfoKHR* getInfo, VkPhysicalDevice* vulkanPhysicalDevice);
|
||||
typedef XrResult (XRAPI_PTR *PFN_xrGetVulkanGraphicsRequirements2KHR)(XrInstance instance, XrSystemId systemId, XrGraphicsRequirementsVulkanKHR* graphicsRequirements);
|
||||
|
||||
#ifndef XR_NO_PROTOTYPES
|
||||
XRAPI_ATTR XrResult XRAPI_CALL xrCreateVulkanInstanceKHR(
|
||||
XrInstance instance,
|
||||
const XrVulkanInstanceCreateInfoKHR* createInfo,
|
||||
VkInstance* vulkanInstance,
|
||||
VkResult* vulkanResult);
|
||||
|
||||
XRAPI_ATTR XrResult XRAPI_CALL xrCreateVulkanDeviceKHR(
|
||||
XrInstance instance,
|
||||
const XrVulkanDeviceCreateInfoKHR* createInfo,
|
||||
VkDevice* vulkanDevice,
|
||||
VkResult* vulkanResult);
|
||||
|
||||
XRAPI_ATTR XrResult XRAPI_CALL xrGetVulkanGraphicsDevice2KHR(
|
||||
XrInstance instance,
|
||||
const XrVulkanGraphicsDeviceGetInfoKHR* getInfo,
|
||||
VkPhysicalDevice* vulkanPhysicalDevice);
|
||||
|
||||
XRAPI_ATTR XrResult XRAPI_CALL xrGetVulkanGraphicsRequirements2KHR(
|
||||
XrInstance instance,
|
||||
XrSystemId systemId,
|
||||
XrGraphicsRequirementsVulkanKHR* graphicsRequirements);
|
||||
#endif
|
||||
#endif /* XR_USE_GRAPHICS_API_VULKAN */
|
||||
|
||||
#ifdef XR_USE_PLATFORM_EGL
|
||||
|
||||
#define XR_MNDX_egl_enable 1
|
||||
|
|
|
@ -80,7 +80,7 @@ typedef unsigned __int64 uint64_t;
|
|||
#endif
|
||||
#endif
|
||||
|
||||
// Identifies if the current compiler has C++11 support enabled.
|
||||
// Identifies if the current compiler has C++11 support enabled.
|
||||
// Does not by itself identify if any given C++11 feature is present.
|
||||
#if !defined(XR_CPP11_ENABLED) && defined(__cplusplus)
|
||||
#if defined(__GNUC__) && defined(__GXX_EXPERIMENTAL_CXX0X__)
|
||||
|
|
|
@ -84,12 +84,12 @@ XR_ENUM_STR(XrResult);
|
|||
_(XR_ERROR_ACTIONSETS_ALREADY_ATTACHED, -47) \
|
||||
_(XR_ERROR_LOCALIZED_NAME_DUPLICATED, -48) \
|
||||
_(XR_ERROR_LOCALIZED_NAME_INVALID, -49) \
|
||||
_(XR_ERROR_GRAPHICS_REQUIREMENTS_CALL_MISSING, -50) \
|
||||
_(XR_ERROR_ANDROID_THREAD_SETTINGS_ID_INVALID_KHR, -1000003000) \
|
||||
_(XR_ERROR_ANDROID_THREAD_SETTINGS_FAILURE_KHR, -1000003001) \
|
||||
_(XR_ERROR_CREATE_SPATIAL_ANCHOR_FAILED_MSFT, -1000039001) \
|
||||
_(XR_ERROR_SECONDARY_VIEW_CONFIGURATION_TYPE_NOT_ENABLED_MSFT, -1000053000) \
|
||||
_(XR_ERROR_CONTROLLER_MODEL_UNAVAILABLE_MSFT, -1000055000) \
|
||||
_(XR_ERROR_CONTROLLER_MODEL_KEY_INVALID_MSFT, -1000055001) \
|
||||
_(XR_ERROR_CONTROLLER_MODEL_KEY_INVALID_MSFT, -1000055000) \
|
||||
_(XR_SPATIAL_ANCHOR_EXPORT_DATA_UNAVAILABLE_MSFT, 1000062000) \
|
||||
_(XR_ERROR_SPATIAL_ANCHOR_EXPORT_FAILED_MSFT, -1000062000) \
|
||||
_(XR_ERROR_SPATIAL_ANCHOR_SUFFICIENCY_QUERY_FAILED_MSFT, -1000062001) \
|
||||
|
@ -181,6 +181,7 @@ XR_ENUM_STR(XrResult);
|
|||
_(XR_TYPE_EVENT_DATA_VISIBILITY_MASK_CHANGED_KHR, 1000031001) \
|
||||
_(XR_TYPE_SESSION_CREATE_INFO_OVERLAY_EXTX, 1000033000) \
|
||||
_(XR_TYPE_EVENT_DATA_MAIN_SESSION_VISIBILITY_CHANGED_EXTX, 1000033003) \
|
||||
_(XR_TYPE_COMPOSITION_LAYER_COLOR_SCALE_BIAS_KHR, 1000034000) \
|
||||
_(XR_TYPE_SPATIAL_ANCHOR_CREATE_INFO_MSFT, 1000039000) \
|
||||
_(XR_TYPE_SPATIAL_ANCHOR_SPACE_CREATE_INFO_MSFT, 1000039001) \
|
||||
_(XR_TYPE_VIEW_CONFIGURATION_DEPTH_RANGE_EXT, 1000046000) \
|
||||
|
@ -202,14 +203,19 @@ XR_ENUM_STR(XrResult);
|
|||
_(XR_TYPE_SECONDARY_VIEW_CONFIGURATION_FRAME_END_INFO_MSFT, 1000053003) \
|
||||
_(XR_TYPE_SECONDARY_VIEW_CONFIGURATION_LAYER_INFO_MSFT, 1000053004) \
|
||||
_(XR_TYPE_SECONDARY_VIEW_CONFIGURATION_SWAPCHAIN_CREATE_INFO_MSFT, 1000053005) \
|
||||
_(XR_TYPE_VIEW_CONFIGURATION_VIEW_FOV_EPIC, 1000059000) \
|
||||
_(XR_TYPE_HOLOGRAPHIC_WINDOW_ATTACHMENT_MSFT, 1000063000) \
|
||||
_(XR_TYPE_INTERACTION_PROFILE_ANALOG_THRESHOLD_VALVE, 1000079000) \
|
||||
_(XR_TYPE_CONTROLLER_MODEL_KEY_STATE_MSFT, 1000055000) \
|
||||
_(XR_TYPE_CONTROLLER_MODEL_NODE_PROPERTIES_MSFT, 1000055001) \
|
||||
_(XR_TYPE_CONTROLLER_MODEL_PROPERTIES_MSFT, 1000055002) \
|
||||
_(XR_TYPE_CONTROLLER_MODEL_NODE_STATE_MSFT, 1000055003) \
|
||||
_(XR_TYPE_CONTROLLER_MODEL_STATE_MSFT, 1000055004) \
|
||||
_(XR_TYPE_VIEW_CONFIGURATION_VIEW_FOV_EPIC, 1000059000) \
|
||||
_(XR_TYPE_HOLOGRAPHIC_WINDOW_ATTACHMENT_MSFT, 1000063000) \
|
||||
_(XR_TYPE_INTERACTION_PROFILE_ANALOG_THRESHOLD_VALVE, 1000079000) \
|
||||
_(XR_TYPE_LOADER_INIT_INFO_ANDROID_KHR, 1000089000) \
|
||||
_(XR_TYPE_VULKAN_INSTANCE_CREATE_INFO_KHR, 1000090000) \
|
||||
_(XR_TYPE_VULKAN_DEVICE_CREATE_INFO_KHR, 1000090001) \
|
||||
_(XR_TYPE_VULKAN_GRAPHICS_DEVICE_GET_INFO_KHR, 1000090003) \
|
||||
_(XR_TYPE_COMPOSITION_LAYER_EQUIRECT2_KHR, 1000091000) \
|
||||
_(XR_TYPE_SPATIAL_ANCHOR_EXPORT_PURPOSE_INFO_MSFT, 1000062000) \
|
||||
_(XR_TYPE_SPATIAL_ANCHOR_EXPORT_SUFFICIENCY_MSFT, 1000062001) \
|
||||
_(XR_STRUCTURE_TYPE_MAX_ENUM, 0x7FFFFFFF)
|
||||
|
@ -413,6 +419,10 @@ XR_ENUM_STR(XrResult);
|
|||
_(XR_INPUT_SOURCE_LOCALIZED_NAME_INTERACTION_PROFILE_BIT, 0x00000002) \
|
||||
_(XR_INPUT_SOURCE_LOCALIZED_NAME_COMPONENT_BIT, 0x00000004) \
|
||||
|
||||
#define XR_LIST_BITS_XrVulkanInstanceCreateFlagsKHR(_)
|
||||
|
||||
#define XR_LIST_BITS_XrVulkanDeviceCreateFlagsKHR(_)
|
||||
|
||||
#define XR_LIST_BITS_XrDebugUtilsMessageSeverityFlagsEXT(_) \
|
||||
_(XR_DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT, 0x00000001) \
|
||||
_(XR_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT, 0x00000010) \
|
||||
|
@ -1055,6 +1065,60 @@ XR_ENUM_STR(XrResult);
|
|||
_(viewConfigurationType) \
|
||||
_(viewIndex) \
|
||||
|
||||
#define XR_LIST_STRUCT_XrCompositionLayerColorScaleBiasKHR(_) \
|
||||
_(type) \
|
||||
_(next) \
|
||||
_(colorScale) \
|
||||
_(colorBias) \
|
||||
|
||||
#define XR_LIST_STRUCT_XrLoaderInitInfoBaseHeaderKHR(_) \
|
||||
_(type) \
|
||||
_(next) \
|
||||
|
||||
#define XR_LIST_STRUCT_XrLoaderInitInfoAndroidKHR(_) \
|
||||
_(type) \
|
||||
_(next) \
|
||||
_(applicationVM) \
|
||||
_(applicationContext) \
|
||||
|
||||
#define XR_LIST_STRUCT_XrVulkanInstanceCreateInfoKHR(_) \
|
||||
_(type) \
|
||||
_(next) \
|
||||
_(systemId) \
|
||||
_(createFlags) \
|
||||
_(pfnGetInstanceProcAddr) \
|
||||
_(vulkanCreateInfo) \
|
||||
_(vulkanAllocator) \
|
||||
|
||||
#define XR_LIST_STRUCT_XrVulkanDeviceCreateInfoKHR(_) \
|
||||
_(type) \
|
||||
_(next) \
|
||||
_(systemId) \
|
||||
_(createFlags) \
|
||||
_(pfnGetInstanceProcAddr) \
|
||||
_(vulkanPhysicalDevice) \
|
||||
_(vulkanCreateInfo) \
|
||||
_(vulkanAllocator) \
|
||||
|
||||
#define XR_LIST_STRUCT_XrVulkanGraphicsDeviceGetInfoKHR(_) \
|
||||
_(type) \
|
||||
_(next) \
|
||||
_(systemId) \
|
||||
_(vulkanInstance) \
|
||||
|
||||
#define XR_LIST_STRUCT_XrCompositionLayerEquirect2KHR(_) \
|
||||
_(type) \
|
||||
_(next) \
|
||||
_(layerFlags) \
|
||||
_(space) \
|
||||
_(eyeVisibility) \
|
||||
_(subImage) \
|
||||
_(pose) \
|
||||
_(radius) \
|
||||
_(centralHorizontalAngle) \
|
||||
_(upperVerticalAngle) \
|
||||
_(lowerVerticalAngle) \
|
||||
|
||||
#define XR_LIST_STRUCT_XrEventDataPerfSettingsEXT(_) \
|
||||
_(type) \
|
||||
_(next) \
|
||||
|
@ -1400,6 +1464,8 @@ XR_ENUM_STR(XrResult);
|
|||
_(XrCompositionLayerEquirectKHR, XR_TYPE_COMPOSITION_LAYER_EQUIRECT_KHR) \
|
||||
_(XrVisibilityMaskKHR, XR_TYPE_VISIBILITY_MASK_KHR) \
|
||||
_(XrEventDataVisibilityMaskChangedKHR, XR_TYPE_EVENT_DATA_VISIBILITY_MASK_CHANGED_KHR) \
|
||||
_(XrCompositionLayerColorScaleBiasKHR, XR_TYPE_COMPOSITION_LAYER_COLOR_SCALE_BIAS_KHR) \
|
||||
_(XrCompositionLayerEquirect2KHR, XR_TYPE_COMPOSITION_LAYER_EQUIRECT2_KHR) \
|
||||
_(XrEventDataPerfSettingsEXT, XR_TYPE_EVENT_DATA_PERF_SETTINGS_EXT) \
|
||||
_(XrDebugUtilsObjectNameInfoEXT, XR_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT) \
|
||||
_(XrDebugUtilsLabelEXT, XR_TYPE_DEBUG_UTILS_LABEL_EXT) \
|
||||
|
@ -1501,15 +1567,6 @@ XR_ENUM_STR(XrResult);
|
|||
#define XR_LIST_STRUCTURE_TYPES_XR_USE_GRAPHICS_API_OPENGL_XR_USE_PLATFORM_XCB(_)
|
||||
#endif
|
||||
|
||||
#if defined(XR_USE_GRAPHICS_API_OPENGL) && defined(XR_USE_PLATFORM_XLIB)
|
||||
#define XR_LIST_STRUCTURE_TYPES_XR_USE_GRAPHICS_API_OPENGL_XR_USE_PLATFORM_XLIB(_) \
|
||||
_(XrGraphicsBindingOpenGLXlibKHR, XR_TYPE_GRAPHICS_BINDING_OPENGL_XLIB_KHR) \
|
||||
|
||||
|
||||
#else
|
||||
#define XR_LIST_STRUCTURE_TYPES_XR_USE_GRAPHICS_API_OPENGL_XR_USE_PLATFORM_XLIB(_)
|
||||
#endif
|
||||
|
||||
#if defined(XR_USE_GRAPHICS_API_OPENGL_ES)
|
||||
#define XR_LIST_STRUCTURE_TYPES_XR_USE_GRAPHICS_API_OPENGL_ES(_) \
|
||||
_(XrSwapchainImageOpenGLESKHR, XR_TYPE_SWAPCHAIN_IMAGE_OPENGL_ES_KHR) \
|
||||
|
@ -1526,6 +1583,9 @@ XR_ENUM_STR(XrResult);
|
|||
_(XrGraphicsBindingVulkanKHR, XR_TYPE_GRAPHICS_BINDING_VULKAN_KHR) \
|
||||
_(XrSwapchainImageVulkanKHR, XR_TYPE_SWAPCHAIN_IMAGE_VULKAN_KHR) \
|
||||
_(XrGraphicsRequirementsVulkanKHR, XR_TYPE_GRAPHICS_REQUIREMENTS_VULKAN_KHR) \
|
||||
_(XrVulkanInstanceCreateInfoKHR, XR_TYPE_VULKAN_INSTANCE_CREATE_INFO_KHR) \
|
||||
_(XrVulkanDeviceCreateInfoKHR, XR_TYPE_VULKAN_DEVICE_CREATE_INFO_KHR) \
|
||||
_(XrVulkanGraphicsDeviceGetInfoKHR, XR_TYPE_VULKAN_GRAPHICS_DEVICE_GET_INFO_KHR) \
|
||||
|
||||
|
||||
#else
|
||||
|
@ -1535,6 +1595,7 @@ XR_ENUM_STR(XrResult);
|
|||
#if defined(XR_USE_PLATFORM_ANDROID)
|
||||
#define XR_LIST_STRUCTURE_TYPES_XR_USE_PLATFORM_ANDROID(_) \
|
||||
_(XrInstanceCreateInfoAndroidKHR, XR_TYPE_INSTANCE_CREATE_INFO_ANDROID_KHR) \
|
||||
_(XrLoaderInitInfoAndroidKHR, XR_TYPE_LOADER_INIT_INFO_ANDROID_KHR) \
|
||||
|
||||
|
||||
#else
|
||||
|
@ -1568,6 +1629,15 @@ XR_ENUM_STR(XrResult);
|
|||
#define XR_LIST_STRUCTURE_TYPES_XR_USE_PLATFORM_WIN32(_)
|
||||
#endif
|
||||
|
||||
#if defined(XR_USE_PLATFORM_XLIB) && defined(XR_USE_GRAPHICS_API_OPENGL)
|
||||
#define XR_LIST_STRUCTURE_TYPES_XR_USE_PLATFORM_XLIB_XR_USE_GRAPHICS_API_OPENGL(_) \
|
||||
_(XrGraphicsBindingOpenGLXlibKHR, XR_TYPE_GRAPHICS_BINDING_OPENGL_XLIB_KHR) \
|
||||
|
||||
|
||||
#else
|
||||
#define XR_LIST_STRUCTURE_TYPES_XR_USE_PLATFORM_XLIB_XR_USE_GRAPHICS_API_OPENGL(_)
|
||||
#endif
|
||||
|
||||
#define XR_LIST_STRUCTURE_TYPES(_) \
|
||||
XR_LIST_STRUCTURE_TYPES_CORE(_) \
|
||||
XR_LIST_STRUCTURE_TYPES_XR_USE_GRAPHICS_API_D3D11(_) \
|
||||
|
@ -1576,13 +1646,13 @@ XR_ENUM_STR(XrResult);
|
|||
XR_LIST_STRUCTURE_TYPES_XR_USE_GRAPHICS_API_OPENGL_XR_USE_PLATFORM_WAYLAND(_) \
|
||||
XR_LIST_STRUCTURE_TYPES_XR_USE_GRAPHICS_API_OPENGL_XR_USE_PLATFORM_WIN32(_) \
|
||||
XR_LIST_STRUCTURE_TYPES_XR_USE_GRAPHICS_API_OPENGL_XR_USE_PLATFORM_XCB(_) \
|
||||
XR_LIST_STRUCTURE_TYPES_XR_USE_GRAPHICS_API_OPENGL_XR_USE_PLATFORM_XLIB(_) \
|
||||
XR_LIST_STRUCTURE_TYPES_XR_USE_GRAPHICS_API_OPENGL_ES(_) \
|
||||
XR_LIST_STRUCTURE_TYPES_XR_USE_GRAPHICS_API_VULKAN(_) \
|
||||
XR_LIST_STRUCTURE_TYPES_XR_USE_PLATFORM_ANDROID(_) \
|
||||
XR_LIST_STRUCTURE_TYPES_XR_USE_PLATFORM_ANDROID_XR_USE_GRAPHICS_API_OPENGL_ES(_) \
|
||||
XR_LIST_STRUCTURE_TYPES_XR_USE_PLATFORM_EGL(_) \
|
||||
XR_LIST_STRUCTURE_TYPES_XR_USE_PLATFORM_WIN32(_) \
|
||||
XR_LIST_STRUCTURE_TYPES_XR_USE_PLATFORM_XLIB_XR_USE_GRAPHICS_API_OPENGL(_) \
|
||||
|
||||
|
||||
#define XR_LIST_EXTENSIONS(_) \
|
||||
|
@ -1605,6 +1675,7 @@ XR_ENUM_STR(XrResult);
|
|||
_(XR_EXT_eye_gaze_interaction, 31) \
|
||||
_(XR_KHR_visibility_mask, 32) \
|
||||
_(XR_EXTX_overlay, 34) \
|
||||
_(XR_KHR_composition_layer_color_scale_bias, 35) \
|
||||
_(XR_KHR_win32_convert_performance_counter_time, 36) \
|
||||
_(XR_KHR_convert_timespec_time, 37) \
|
||||
_(XR_VARJO_quad_views, 38) \
|
||||
|
@ -1621,7 +1692,7 @@ XR_ENUM_STR(XrResult);
|
|||
_(XR_MSFT_hand_tracking_mesh, 53) \
|
||||
_(XR_MSFT_secondary_view_configuration, 54) \
|
||||
_(XR_MSFT_first_person_observer, 55) \
|
||||
_(XR_MSFT_controller_model_preview, 56) \
|
||||
_(XR_MSFT_controller_model, 56) \
|
||||
_(XR_MSFT_perception_anchor_interop_preview, 57) \
|
||||
_(XR_EXT_win32_appcontainer_compatible, 58) \
|
||||
_(XR_EPIC_view_configuration_fov, 60) \
|
||||
|
@ -1629,6 +1700,10 @@ XR_ENUM_STR(XrResult);
|
|||
_(XR_MSFT_holographic_window_attachment, 64) \
|
||||
_(XR_HUAWEI_controller_interaction, 70) \
|
||||
_(XR_VALVE_analog_threshold, 80) \
|
||||
_(XR_KHR_loader_init, 89) \
|
||||
_(XR_KHR_loader_init_android, 90) \
|
||||
_(XR_KHR_vulkan_enable2, 91) \
|
||||
_(XR_KHR_composition_layer_equirect2, 92) \
|
||||
_(XR_EXT_samsung_odyssey_controller, 95) \
|
||||
_(XR_EXT_hp_mixed_reality_controller, 96) \
|
||||
_(XR_MND_swapchain_usage_input_attachment_bit, 97) \
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -25,7 +25,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE, _In_opt_ HINSTANCE, _In_ LPWSTR, _In_ int)
|
|||
auto on_exit = MakeScopeGuard([] { ::CoUninitialize(); });
|
||||
|
||||
engine::XrAppConfiguration appConfig({"SampleSceneWin32", 1});
|
||||
appConfig.RequestedExtensions.push_back(XR_MSFT_CONTROLLER_MODEL_PREVIEW_EXTENSION_NAME);
|
||||
appConfig.RequestedExtensions.push_back(XR_MSFT_CONTROLLER_MODEL_EXTENSION_NAME);
|
||||
|
||||
auto app = engine::CreateXrApp(appConfig);
|
||||
app->AddScene(TryCreateTitleScene(app->Context()));
|
||||
|
|
|
@ -351,7 +351,6 @@
|
|||
<ClInclude Include="DirectXTK\PlatformHelpers.h" />
|
||||
<ClInclude Include="DxUtility.h" />
|
||||
<ClInclude Include="FileUtility.h" />
|
||||
<ClInclude Include="Guid.h" />
|
||||
<ClInclude Include="ScopeGuard.h" />
|
||||
<ClInclude Include="ThreadPool.h" />
|
||||
<ClInclude Include="Trace.h" />
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
<ClInclude Include="Trace.h" />
|
||||
<ClInclude Include="ScopeGuard.h" />
|
||||
<ClInclude Include="ThreadPool.h" />
|
||||
<ClInclude Include="Guid.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="DirectXTK">
|
||||
|
|
|
@ -330,7 +330,6 @@
|
|||
<ClInclude Include="DirectXTK\PlatformHelpers.h" />
|
||||
<ClInclude Include="DxUtility.h" />
|
||||
<ClInclude Include="FileUtility.h" />
|
||||
<ClInclude Include="Guid.h" />
|
||||
<ClInclude Include="ScopeGuard.h" />
|
||||
<ClInclude Include="ThreadPool.h" />
|
||||
<ClInclude Include="Trace.h" />
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
<ClInclude Include="FileUtility.h" />
|
||||
<ClInclude Include="DxUtility.h" />
|
||||
<ClInclude Include="Trace.h" />
|
||||
<ClInclude Include="Guid.h" />
|
||||
<ClInclude Include="ThreadPool.h" />
|
||||
<ClInclude Include="ScopeGuard.h" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
//*********************************************************
|
||||
#include "pch.h"
|
||||
#include <pbr/PbrModel.h>
|
||||
#include <pbr/GltfLoader.h>
|
||||
#include <SampleShared/FileUtility.h>
|
||||
#include "PbrModelObject.h"
|
||||
|
||||
using namespace DirectX;
|
||||
|
@ -61,6 +63,35 @@ void PbrModelObject::SetBaseColorFactor(const Pbr::RGBAColor color) {
|
|||
}
|
||||
}
|
||||
|
||||
using engine::PbrModelLoadOperation;
|
||||
|
||||
/* static */ PbrModelLoadOperation PbrModelLoadOperation::LoadGltfBinaryAsync(Pbr::Resources& pbrResources, std::wstring filename) {
|
||||
return PbrModelLoadOperation(std::async(std::launch::async, [&pbrResources, filename = std::move(filename)]() {
|
||||
const std::vector<uint8_t> glbData = sample::ReadFileBytes(sample::FindFileInAppFolder(filename.c_str()));
|
||||
return Gltf::FromGltfBinary(pbrResources, glbData);
|
||||
}));
|
||||
}
|
||||
|
||||
std::shared_ptr<Pbr::Model> PbrModelLoadOperation::TakeModelWhenReady() {
|
||||
if (m_loadModelTask.valid() && m_loadModelTask.wait_for(std::chrono::milliseconds(0)) == std::future_status::ready) {
|
||||
return m_loadModelTask.get();
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
PbrModelLoadOperation::~PbrModelLoadOperation() {
|
||||
// Caller ensures reference to Pbr::Resources stays alive only until this object is destroyed, so delay destruction if it is
|
||||
// still in use.
|
||||
if (m_loadModelTask.valid()) {
|
||||
m_loadModelTask.get();
|
||||
}
|
||||
}
|
||||
|
||||
PbrModelLoadOperation::PbrModelLoadOperation(std::future<std::shared_ptr<Pbr::Model>> loadModelTask)
|
||||
: m_loadModelTask(std::move(loadModelTask)) {
|
||||
}
|
||||
|
||||
std::shared_ptr<PbrModelObject> engine::CreateCube(const Pbr::Resources& pbrResources,
|
||||
XMFLOAT3 sideLengths,
|
||||
const Pbr::RGBAColor color,
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
//*********************************************************
|
||||
#pragma once
|
||||
|
||||
#include <future>
|
||||
#include <pbr/PbrModel.h>
|
||||
#include <pbr/PbrMaterial.h>
|
||||
#include "Scene.h"
|
||||
|
@ -43,6 +44,26 @@ namespace engine {
|
|||
Pbr::FillMode m_fillMode;
|
||||
};
|
||||
|
||||
// Helper for loading GLB files in the background.
|
||||
struct PbrModelLoadOperation {
|
||||
PbrModelLoadOperation() = default;
|
||||
PbrModelLoadOperation(PbrModelLoadOperation&&) = default;
|
||||
PbrModelLoadOperation& operator=(PbrModelLoadOperation&&) = default;
|
||||
|
||||
static PbrModelLoadOperation LoadGltfBinaryAsync(Pbr::Resources& pbrResources, std::wstring filename);
|
||||
|
||||
// Take the model (can only be done once) once it has been loaded.
|
||||
std::shared_ptr<Pbr::Model> TakeModelWhenReady();
|
||||
|
||||
// Dtor ensures outstanding operation is complete before returning.
|
||||
~PbrModelLoadOperation();
|
||||
|
||||
private:
|
||||
explicit PbrModelLoadOperation(std::future<std::shared_ptr<Pbr::Model>> loadModelTask);
|
||||
|
||||
std::future<std::shared_ptr<Pbr::Model>> m_loadModelTask;
|
||||
};
|
||||
|
||||
std::shared_ptr<PbrModelObject> CreateCube(const Pbr::Resources& pbrResources,
|
||||
DirectX::XMFLOAT3 sideLengths,
|
||||
Pbr::RGBAColor color,
|
||||
|
|
|
@ -16,15 +16,15 @@
|
|||
#include "pch.h"
|
||||
#include "SpaceObject.h"
|
||||
|
||||
engine::SpaceObject::SpaceObject(std::unique_ptr<xr::SpaceHandle> space, bool hideWhenPoseInvalid)
|
||||
engine::SpaceObject::SpaceObject(xr::SpaceHandle space, bool hideWhenPoseInvalid)
|
||||
: m_space(std::move(space))
|
||||
, m_hideWhenPoseInvalid(hideWhenPoseInvalid) {
|
||||
assert(m_space != nullptr);
|
||||
assert(m_space.Get() != XR_NULL_HANDLE);
|
||||
}
|
||||
|
||||
void engine::SpaceObject::Update(engine::Context& context, const engine::FrameTime& frameTime) {
|
||||
XrSpaceLocation location{XR_TYPE_SPACE_LOCATION};
|
||||
xrLocateSpace(m_space->Get(), context.SceneSpace, frameTime.PredictedDisplayTime, &location);
|
||||
CHECK_XRCMD(xrLocateSpace(m_space.Get(), context.SceneSpace, frameTime.PredictedDisplayTime, &location));
|
||||
const bool poseValid = xr::math::Pose::IsPoseValid(location);
|
||||
if (poseValid) {
|
||||
Pose() = location.pose;
|
||||
|
|
|
@ -21,12 +21,12 @@ namespace engine {
|
|||
|
||||
class SpaceObject : public Object {
|
||||
public:
|
||||
SpaceObject(std::unique_ptr<xr::SpaceHandle> space, bool hideWhenPoseInvalid = true);
|
||||
SpaceObject(xr::SpaceHandle space, bool hideWhenPoseInvalid = true);
|
||||
|
||||
void Update(engine::Context& context, const engine::FrameTime& frameTime) override;
|
||||
|
||||
private:
|
||||
std::unique_ptr<xr::SpaceHandle> m_space;
|
||||
xr::SpaceHandle m_space;
|
||||
const bool m_hideWhenPoseInvalid;
|
||||
};
|
||||
} // namespace engine
|
||||
|
|
|
@ -40,6 +40,7 @@ namespace xr {
|
|||
bool SupportsHPMixedRealityController;
|
||||
bool SupportsSpatialAnchorExport;
|
||||
bool SupportsPerceptionAnchorInterop;
|
||||
bool SupportsColorScaleBias;
|
||||
|
||||
std::vector<const char*> EnabledExtensions;
|
||||
};
|
||||
|
@ -80,13 +81,14 @@ namespace xr {
|
|||
extensions.SupportsHandJointTracking = isExtensionEnabled(XR_EXT_HAND_TRACKING_EXTENSION_NAME);
|
||||
extensions.SupportsHandMeshTracking = isExtensionEnabled(XR_MSFT_HAND_TRACKING_MESH_EXTENSION_NAME);
|
||||
extensions.SupportsSpatialGraphBridge = isExtensionEnabled(XR_MSFT_SPATIAL_GRAPH_BRIDGE_EXTENSION_NAME);
|
||||
extensions.SupportsControllerModel = isExtensionEnabled(XR_MSFT_CONTROLLER_MODEL_PREVIEW_EXTENSION_NAME);
|
||||
extensions.SupportsControllerModel = isExtensionEnabled(XR_MSFT_CONTROLLER_MODEL_EXTENSION_NAME);
|
||||
extensions.SupportsAppContainer = isExtensionEnabled(XR_EXT_WIN32_APPCONTAINER_COMPATIBLE_EXTENSION_NAME);
|
||||
extensions.SupportsHolographicWindowAttachment = isExtensionEnabled(XR_MSFT_HOLOGRAPHIC_WINDOW_ATTACHMENT_EXTENSION_NAME);
|
||||
extensions.SupportsSamsungOdysseyController = isExtensionEnabled(XR_EXT_SAMSUNG_ODYSSEY_CONTROLLER_EXTENSION_NAME);
|
||||
extensions.SupportsHPMixedRealityController = isExtensionEnabled(XR_EXT_HP_MIXED_REALITY_CONTROLLER_EXTENSION_NAME);
|
||||
extensions.SupportsSpatialAnchorExport = isExtensionEnabled(XR_MSFT_SPATIAL_ANCHOR_EXPORT_PREVIEW_EXTENSION_NAME);
|
||||
extensions.SupportsPerceptionAnchorInterop = isExtensionEnabled(XR_MSFT_PERCEPTION_ANCHOR_INTEROP_PREVIEW_EXTENSION_NAME);
|
||||
extensions.SupportsColorScaleBias = isExtensionEnabled(XR_KHR_COMPOSITION_LAYER_COLOR_SCALE_BIAS_EXTENSION_NAME);
|
||||
|
||||
return extensions;
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#define FOR_EACH_VISIBILITY_MASK_FUNCTION(_)
|
||||
#endif
|
||||
|
||||
#ifdef XR_MSFT_controller_model_preview
|
||||
#ifdef XR_MSFT_controller_model
|
||||
#define FOR_EACH_CONTROLLER_MODEL_EXTENSION_FUNCTION(_) \
|
||||
_(xrGetControllerModelKeyMSFT) \
|
||||
_(xrLoadControllerModelMSFT) \
|
||||
|
|
|
@ -44,7 +44,7 @@ namespace xr {
|
|||
};
|
||||
|
||||
template <typename TGuid>
|
||||
XrGuid ToXrGuid(TGuid& guid) {
|
||||
XrGuid ToXrGuid(const TGuid& guid) {
|
||||
XrGuid dest;
|
||||
static_assert(sizeof(guid) == sizeof(dest), "GUID sizes must be equal");
|
||||
#ifdef _MSC_VER
|
||||
|
|
|
@ -190,6 +190,36 @@ namespace xr::math {
|
|||
DEFINE_CAST(DirectX::XMFLOAT2, XrExtent2Df);
|
||||
#undef DEFINE_CAST
|
||||
|
||||
#define VECTOR2F_OPERATOR(op) \
|
||||
constexpr XrVector2f operator op(const XrVector2f& a, const XrVector2f& b) { \
|
||||
return XrVector2f{a.x op b.x, a.y op b.y}; \
|
||||
}
|
||||
VECTOR2F_OPERATOR(+);
|
||||
VECTOR2F_OPERATOR(-);
|
||||
VECTOR2F_OPERATOR(*);
|
||||
VECTOR2F_OPERATOR(/);
|
||||
#undef VECTOR2F_OPERATOR
|
||||
|
||||
#define VECTOR2F_OPERATOR(op) \
|
||||
constexpr XrVector2f operator op(const XrVector2f& a, float s) { \
|
||||
return XrVector2f{a.x op s, a.y op s}; \
|
||||
}
|
||||
VECTOR2F_OPERATOR(+);
|
||||
VECTOR2F_OPERATOR(-);
|
||||
VECTOR2F_OPERATOR(*);
|
||||
VECTOR2F_OPERATOR(/);
|
||||
#undef VECTOR2F_OPERATOR
|
||||
|
||||
#define VECTOR2F_OPERATOR(op) \
|
||||
constexpr XrVector2f operator op(float s, const XrVector2f& a) { \
|
||||
return XrVector2f{s op a.x, s op a.y}; \
|
||||
}
|
||||
VECTOR2F_OPERATOR(+);
|
||||
VECTOR2F_OPERATOR(-);
|
||||
VECTOR2F_OPERATOR(*);
|
||||
VECTOR2F_OPERATOR(/);
|
||||
#undef VECTOR2F_OPERATOR
|
||||
|
||||
#define VECTOR3F_OPERATOR(op) \
|
||||
constexpr XrVector3f operator op(const XrVector3f& a, const XrVector3f& b) { \
|
||||
return XrVector3f{a.x op b.x, a.y op b.y, a.z op b.z}; \
|
||||
|
|
Загрузка…
Ссылка в новой задаче