Update samples for OpenXR SDK 1.0.10 (#60)

* Update samples to SDK 1.0.10

* Update to 1.0.10.2 openxr_loader nuget

* Cherry pick some vcxproj simplification.
This commit is contained in:
yl-msft 2020-09-04 11:57:16 -07:00 коммит произвёл GitHub
Родитель ee63815b53
Коммит eeab27ae62
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
46 изменённых файлов: 2847 добавлений и 543 удалений

Просмотреть файл

@ -29,7 +29,10 @@ 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_holographic_window_attachment_preview](https://microsoft.github.io/OpenXR-MixedReality/openxr_preview/specs/openxr.html#XR_MSFT_holographic_window_attachment_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)
Please send feedback on preview extensions and samples at [GitHub issues](https://github.com/microsoft/OpenXR-MixedReality/issues).
We are planning to incorporate your feedback and finalize these extensions as vendor extensions (MSFT) or cross-vendor extensions (EXT)
@ -65,7 +68,7 @@ demos the usage of [XR_MSFT_controller_model_preview](https://microsoft.github.i
- **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,
and using [XR_MSFT_holographic_window_attachment_preview](https://microsoft.github.io/OpenXR-MixedReality/openxr_preview/specs/openxr.html#XR_MSFT_holographic_window_attachment_preview) extension
and using [XR_MSFT_holographic_window_attachment](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_MSFT_holographic_window_attachment) extension
to interop with CoreWindow in order to support [keyboard inputs](https://docs.microsoft.com/en-us/windows/mixed-reality/keyboard-mouse-and-controller-input-in-directx#subscribe-for-corewindow-input-events)
and [TextEditingContext](https://docs.microsoft.com/en-us/uwp/api/Windows.UI.Text.Core.CoreTextEditContext?view=winrt-19041).

Просмотреть файл

@ -4,19 +4,7 @@
/*
** Copyright (c) 2017-2020 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
** SPDX-License-Identifier: Apache-2.0 OR MIT
*/
/*
@ -37,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, 9)
#define XR_CURRENT_API_VERSION XR_MAKE_VERSION(1, 0, 10)
#define XR_VERSION_MAJOR(version) (uint16_t)(((uint64_t)(version) >> 48)& 0xffffULL)
#define XR_VERSION_MINOR(version) (uint16_t)(((uint64_t)(version) >> 32) & 0xffffULL)
@ -198,6 +186,9 @@ typedef enum XrResult {
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_SPATIAL_ANCHOR_EXPORT_DATA_UNAVAILABLE_MSFT = 1000062000,
XR_ERROR_SPATIAL_ANCHOR_EXPORT_FAILED_MSFT = -1000062000,
XR_ERROR_SPATIAL_ANCHOR_SUFFICIENCY_QUERY_FAILED_MSFT = -1000062001,
XR_RESULT_MAX_ENUM = 0x7FFFFFFF
} XrResult;
@ -309,12 +300,15 @@ typedef enum XrStructureType {
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_HOLOGRAPHIC_WINDOW_ATTACHMENT_MSFT = 1000063000,
XR_TYPE_SPATIAL_ANCHOR_EXPORT_PURPOSE_INFO_MSFT = 1000062000,
XR_TYPE_SPATIAL_ANCHOR_EXPORT_SUFFICIENCY_MSFT = 1000062001,
XR_STRUCTURE_TYPE_MAX_ENUM = 0x7FFFFFFF
} XrStructureType;
@ -387,6 +381,7 @@ typedef enum XrObjectType {
XR_OBJECT_TYPE_DEBUG_UTILS_MESSENGER_EXT = 1000019000,
XR_OBJECT_TYPE_SPATIAL_ANCHOR_MSFT = 1000039000,
XR_OBJECT_TYPE_HAND_TRACKER_EXT = 1000051000,
XR_OBJECT_TYPE_SPATIAL_ANCHOR_NEIGHBORHOOD_DATA_STREAM_MSFT = 1000062000,
XR_OBJECT_TYPE_MAX_ENUM = 0x7FFFFFFF
} XrObjectType;
typedef XrFlags64 XrInstanceCreateFlags;
@ -427,6 +422,7 @@ static const XrSwapchainUsageFlags XR_SWAPCHAIN_USAGE_TRANSFER_SRC_BIT = 0x00000
static const XrSwapchainUsageFlags XR_SWAPCHAIN_USAGE_TRANSFER_DST_BIT = 0x00000010;
static const XrSwapchainUsageFlags XR_SWAPCHAIN_USAGE_SAMPLED_BIT = 0x00000020;
static const XrSwapchainUsageFlags XR_SWAPCHAIN_USAGE_MUTABLE_FORMAT_BIT = 0x00000040;
static const XrSwapchainUsageFlags XR_SWAPCHAIN_USAGE_INPUT_ATTACHMENT_BIT_MND = 0x00000080;
typedef XrFlags64 XrCompositionLayerFlags;
@ -2105,10 +2101,94 @@ typedef struct XrViewConfigurationViewFovEPIC {
#define XR_MSFT_spatial_anchor_export_preview 1
XR_DEFINE_HANDLE(XrSpatialAnchorNeighborhoodDataStreamMSFT)
#define XR_MSFT_spatial_anchor_export_preview_SPEC_VERSION 1
#define XR_MSFT_SPATIAL_ANCHOR_EXPORT_PREVIEW_EXTENSION_NAME "XR_MSFT_spatial_anchor_export_preview"
typedef enum XrSpatialAnchorExportPurposeMSFT {
XR_SPATIAL_ANCHOR_EXPORT_PURPOSE_RELOCALIZATION_MSFT = 0,
XR_SPATIAL_ANCHOR_EXPORT_PURPOSE_SHARING_MSFT = 1,
XR_SPATIAL_ANCHOR_EXPORT_PURPOSE_MAX_ENUM_MSFT = 0x7FFFFFFF
} XrSpatialAnchorExportPurposeMSFT;
typedef struct XrSpatialAnchorExportPurposeInfoMSFT {
XrStructureType type;
const void* XR_MAY_ALIAS next;
XrSpatialAnchorExportPurposeMSFT exportPurpose;
} XrSpatialAnchorExportPurposeInfoMSFT;
typedef struct XrSpatialAnchorExportSufficiencyMSFT {
XrStructureType type;
const void* XR_MAY_ALIAS next;
XrBool32 isMinimallySufficient;
float recommendedSufficiencyLevel;
float sufficiencyLevel;
} XrSpatialAnchorExportSufficiencyMSFT;
typedef XrResult (XRAPI_PTR *PFN_xrCreateSpatialAnchorNeighborhoodDataStreamMSFT)(XrSpatialAnchorMSFT spatialAnchor, const XrSpatialAnchorExportPurposeInfoMSFT* exportPurposeInfo, XrSpatialAnchorNeighborhoodDataStreamMSFT* neighborhoodDataStream);
typedef XrResult (XRAPI_PTR *PFN_xrDestroySpatialAnchorNeighborhoodDataStreamMSFT)(XrSpatialAnchorNeighborhoodDataStreamMSFT neighborhoodDataStream);
typedef XrResult (XRAPI_PTR *PFN_xrReadSpatialAnchorNeighborhoodDataMSFT)(XrSpatialAnchorNeighborhoodDataStreamMSFT neighborhoodDataStream, uint32_t bytesToRead, uint32_t* bytesRead, void* buffer);
typedef XrResult (XRAPI_PTR *PFN_xrGetSpatialAnchorExportSufficiencyMSFT)(XrSpatialAnchorMSFT spatialAnchor, const XrSpatialAnchorExportPurposeInfoMSFT* exportPurposeInfo, XrSpatialAnchorExportSufficiencyMSFT* exportSufficiency);
#ifndef XR_NO_PROTOTYPES
XRAPI_ATTR XrResult XRAPI_CALL xrCreateSpatialAnchorNeighborhoodDataStreamMSFT(
XrSpatialAnchorMSFT spatialAnchor,
const XrSpatialAnchorExportPurposeInfoMSFT* exportPurposeInfo,
XrSpatialAnchorNeighborhoodDataStreamMSFT* neighborhoodDataStream);
XRAPI_ATTR XrResult XRAPI_CALL xrDestroySpatialAnchorNeighborhoodDataStreamMSFT(
XrSpatialAnchorNeighborhoodDataStreamMSFT neighborhoodDataStream);
XRAPI_ATTR XrResult XRAPI_CALL xrReadSpatialAnchorNeighborhoodDataMSFT(
XrSpatialAnchorNeighborhoodDataStreamMSFT neighborhoodDataStream,
uint32_t bytesToRead,
uint32_t* bytesRead,
void* XR_MAY_ALIAS buffer);
XRAPI_ATTR XrResult XRAPI_CALL xrGetSpatialAnchorExportSufficiencyMSFT(
XrSpatialAnchorMSFT spatialAnchor,
const XrSpatialAnchorExportPurposeInfoMSFT* exportPurposeInfo,
XrSpatialAnchorExportSufficiencyMSFT* exportSufficiency);
#endif
#define XR_HUAWEI_controller_interaction 1
#define XR_HUAWEI_controller_interaction_SPEC_VERSION 1
#define XR_HUAWEI_CONTROLLER_INTERACTION_EXTENSION_NAME "XR_HUAWEI_controller_interaction"
#define XR_VALVE_analog_threshold 1
#define XR_VALVE_analog_threshold_SPEC_VERSION 1
#define XR_VALVE_ANALOG_THRESHOLD_EXTENSION_NAME "XR_VALVE_analog_threshold"
typedef struct XrInteractionProfileAnalogThresholdVALVE {
XrStructureType type;
const void* XR_MAY_ALIAS next;
XrAction action;
XrPath binding;
float onThreshold;
float offThreshold;
const XrHapticBaseHeader* onHaptic;
const XrHapticBaseHeader* offHaptic;
} XrInteractionProfileAnalogThresholdVALVE;
#define XR_EXT_samsung_odyssey_controller 1
#define XR_EXT_samsung_odyssey_controller_SPEC_VERSION 1
#define XR_EXT_SAMSUNG_ODYSSEY_CONTROLLER_EXTENSION_NAME "XR_EXT_samsung_odyssey_controller"
#define XR_EXT_hp_mixed_reality_controller 1
#define XR_EXT_hp_mixed_reality_controller_SPEC_VERSION 1
#define XR_EXT_HP_MIXED_REALITY_CONTROLLER_EXTENSION_NAME "XR_EXT_hp_mixed_reality_controller"
#define XR_MND_swapchain_usage_input_attachment_bit 1
#define XR_MND_swapchain_usage_input_attachment_bit_SPEC_VERSION 2
#define XR_MND_SWAPCHAIN_USAGE_INPUT_ATTACHMENT_BIT_EXTENSION_NAME "XR_MND_swapchain_usage_input_attachment_bit"
#ifdef __cplusplus
}
#endif

Просмотреть файл

@ -4,19 +4,7 @@
/*
** Copyright (c) 2017-2020 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
** SPDX-License-Identifier: Apache-2.0 OR MIT
*/
/*
@ -396,9 +384,30 @@ typedef struct XrGraphicsBindingEGLMNDX {
#ifdef XR_USE_PLATFORM_WIN32
#define XR_MSFT_holographic_window_attachment_preview 1
#define XR_MSFT_holographic_window_attachment_preview_SPEC_VERSION 1
#define XR_MSFT_HOLOGRAPHIC_WINDOW_ATTACHMENT_PREVIEW_EXTENSION_NAME "XR_MSFT_holographic_window_attachment_preview"
#define XR_MSFT_perception_anchor_interop_preview 1
#define XR_MSFT_perception_anchor_interop_preview_SPEC_VERSION 1
#define XR_MSFT_PERCEPTION_ANCHOR_INTEROP_PREVIEW_EXTENSION_NAME "XR_MSFT_perception_anchor_interop_preview"
typedef XrResult (XRAPI_PTR *PFN_xrCreateSpatialAnchorFromPerceptionAnchorMSFT)(XrSession session, IUnknown* perceptionAnchor, XrSpatialAnchorMSFT* anchor);
typedef XrResult (XRAPI_PTR *PFN_xrTryGetPerceptionAnchorFromSpatialAnchorMSFT)(XrSession session, XrSpatialAnchorMSFT anchor, IUnknown** perceptionAnchor);
#ifndef XR_NO_PROTOTYPES
XRAPI_ATTR XrResult XRAPI_CALL xrCreateSpatialAnchorFromPerceptionAnchorMSFT(
XrSession session,
IUnknown* perceptionAnchor,
XrSpatialAnchorMSFT* anchor);
XRAPI_ATTR XrResult XRAPI_CALL xrTryGetPerceptionAnchorFromSpatialAnchorMSFT(
XrSession session,
XrSpatialAnchorMSFT anchor,
IUnknown** perceptionAnchor);
#endif
#endif /* XR_USE_PLATFORM_WIN32 */
#ifdef XR_USE_PLATFORM_WIN32
#define XR_MSFT_holographic_window_attachment 1
#define XR_MSFT_holographic_window_attachment_SPEC_VERSION 1
#define XR_MSFT_HOLOGRAPHIC_WINDOW_ATTACHMENT_EXTENSION_NAME "XR_MSFT_holographic_window_attachment"
#ifdef XR_USE_PLATFORM_WIN32
typedef struct XrHolographicWindowAttachmentMSFT {
XrStructureType type;

Просмотреть файл

@ -1,19 +1,7 @@
/*
** Copyright (c) 2017-2020 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
** SPDX-License-Identifier: Apache-2.0 OR MIT
*/
#ifndef OPENXR_PLATFORM_DEFINES_H_

Просмотреть файл

@ -4,19 +4,7 @@
/*
** Copyright (c) 2017-2020 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
** SPDX-License-Identifier: Apache-2.0 OR MIT
*/
/*
@ -102,6 +90,9 @@ XR_ENUM_STR(XrResult);
_(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_SPATIAL_ANCHOR_EXPORT_DATA_UNAVAILABLE_MSFT, 1000062000) \
_(XR_ERROR_SPATIAL_ANCHOR_EXPORT_FAILED_MSFT, -1000062000) \
_(XR_ERROR_SPATIAL_ANCHOR_SUFFICIENCY_QUERY_FAILED_MSFT, -1000062001) \
_(XR_RESULT_MAX_ENUM, 0x7FFFFFFF)
#define XR_LIST_ENUM_XrStructureType(_) \
@ -212,12 +203,15 @@ XR_ENUM_STR(XrResult);
_(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_HOLOGRAPHIC_WINDOW_ATTACHMENT_MSFT, 1000063000) \
_(XR_TYPE_SPATIAL_ANCHOR_EXPORT_PURPOSE_INFO_MSFT, 1000062000) \
_(XR_TYPE_SPATIAL_ANCHOR_EXPORT_SUFFICIENCY_MSFT, 1000062001) \
_(XR_STRUCTURE_TYPE_MAX_ENUM, 0x7FFFFFFF)
#define XR_LIST_ENUM_XrFormFactor(_) \
@ -282,6 +276,7 @@ XR_ENUM_STR(XrResult);
_(XR_OBJECT_TYPE_DEBUG_UTILS_MESSENGER_EXT, 1000019000) \
_(XR_OBJECT_TYPE_SPATIAL_ANCHOR_MSFT, 1000039000) \
_(XR_OBJECT_TYPE_HAND_TRACKER_EXT, 1000051000) \
_(XR_OBJECT_TYPE_SPATIAL_ANCHOR_NEIGHBORHOOD_DATA_STREAM_MSFT, 1000062000) \
_(XR_OBJECT_TYPE_MAX_ENUM, 0x7FFFFFFF)
#define XR_LIST_ENUM_XrAndroidThreadTypeKHR(_) \
@ -369,6 +364,11 @@ XR_ENUM_STR(XrResult);
_(XR_HAND_POSE_TYPE_REFERENCE_OPEN_PALM_MSFT, 1) \
_(XR_HAND_POSE_TYPE_MAX_ENUM_MSFT, 0x7FFFFFFF)
#define XR_LIST_ENUM_XrSpatialAnchorExportPurposeMSFT(_) \
_(XR_SPATIAL_ANCHOR_EXPORT_PURPOSE_RELOCALIZATION_MSFT, 0) \
_(XR_SPATIAL_ANCHOR_EXPORT_PURPOSE_SHARING_MSFT, 1) \
_(XR_SPATIAL_ANCHOR_EXPORT_PURPOSE_MAX_ENUM_MSFT, 0x7FFFFFFF)
#define XR_LIST_BITS_XrInstanceCreateFlags(_)
#define XR_LIST_BITS_XrSessionCreateFlags(_)
@ -395,6 +395,7 @@ XR_ENUM_STR(XrResult);
_(XR_SWAPCHAIN_USAGE_TRANSFER_DST_BIT, 0x00000010) \
_(XR_SWAPCHAIN_USAGE_SAMPLED_BIT, 0x00000020) \
_(XR_SWAPCHAIN_USAGE_MUTABLE_FORMAT_BIT, 0x00000040) \
_(XR_SWAPCHAIN_USAGE_INPUT_ATTACHMENT_BIT_MND, 0x00000080) \
#define XR_LIST_BITS_XrCompositionLayerFlags(_) \
_(XR_COMPOSITION_LAYER_CORRECT_CHROMATIC_ABERRATION_BIT, 0x00000001) \
@ -1313,12 +1314,34 @@ XR_ENUM_STR(XrResult);
_(recommendedFov) \
_(maxMutableFov) \
#define XR_LIST_STRUCT_XrSpatialAnchorExportPurposeInfoMSFT(_) \
_(type) \
_(next) \
_(exportPurpose) \
#define XR_LIST_STRUCT_XrSpatialAnchorExportSufficiencyMSFT(_) \
_(type) \
_(next) \
_(isMinimallySufficient) \
_(recommendedSufficiencyLevel) \
_(sufficiencyLevel) \
#define XR_LIST_STRUCT_XrHolographicWindowAttachmentMSFT(_) \
_(type) \
_(next) \
_(holographicSpace) \
_(coreWindow) \
#define XR_LIST_STRUCT_XrInteractionProfileAnalogThresholdVALVE(_) \
_(type) \
_(next) \
_(action) \
_(binding) \
_(onThreshold) \
_(offThreshold) \
_(onHaptic) \
_(offHaptic) \
#define XR_LIST_STRUCTURE_TYPES_CORE(_) \
@ -1412,6 +1435,9 @@ XR_ENUM_STR(XrResult);
_(XrControllerModelNodeStateMSFT, XR_TYPE_CONTROLLER_MODEL_NODE_STATE_MSFT) \
_(XrControllerModelStateMSFT, XR_TYPE_CONTROLLER_MODEL_STATE_MSFT) \
_(XrViewConfigurationViewFovEPIC, XR_TYPE_VIEW_CONFIGURATION_VIEW_FOV_EPIC) \
_(XrSpatialAnchorExportPurposeInfoMSFT, XR_TYPE_SPATIAL_ANCHOR_EXPORT_PURPOSE_INFO_MSFT) \
_(XrSpatialAnchorExportSufficiencyMSFT, XR_TYPE_SPATIAL_ANCHOR_EXPORT_SUFFICIENCY_MSFT) \
_(XrInteractionProfileAnalogThresholdVALVE, XR_TYPE_INTERACTION_PROFILE_ANALOG_THRESHOLD_VALVE) \
@ -1448,6 +1474,42 @@ XR_ENUM_STR(XrResult);
#define XR_LIST_STRUCTURE_TYPES_XR_USE_GRAPHICS_API_OPENGL(_)
#endif
#if defined(XR_USE_GRAPHICS_API_OPENGL) && defined(XR_USE_PLATFORM_WAYLAND)
#define XR_LIST_STRUCTURE_TYPES_XR_USE_GRAPHICS_API_OPENGL_XR_USE_PLATFORM_WAYLAND(_) \
_(XrGraphicsBindingOpenGLWaylandKHR, XR_TYPE_GRAPHICS_BINDING_OPENGL_WAYLAND_KHR) \
#else
#define XR_LIST_STRUCTURE_TYPES_XR_USE_GRAPHICS_API_OPENGL_XR_USE_PLATFORM_WAYLAND(_)
#endif
#if defined(XR_USE_GRAPHICS_API_OPENGL) && defined(XR_USE_PLATFORM_WIN32)
#define XR_LIST_STRUCTURE_TYPES_XR_USE_GRAPHICS_API_OPENGL_XR_USE_PLATFORM_WIN32(_) \
_(XrGraphicsBindingOpenGLWin32KHR, XR_TYPE_GRAPHICS_BINDING_OPENGL_WIN32_KHR) \
#else
#define XR_LIST_STRUCTURE_TYPES_XR_USE_GRAPHICS_API_OPENGL_XR_USE_PLATFORM_WIN32(_)
#endif
#if defined(XR_USE_GRAPHICS_API_OPENGL) && defined(XR_USE_PLATFORM_XCB)
#define XR_LIST_STRUCTURE_TYPES_XR_USE_GRAPHICS_API_OPENGL_XR_USE_PLATFORM_XCB(_) \
_(XrGraphicsBindingOpenGLXcbKHR, XR_TYPE_GRAPHICS_BINDING_OPENGL_XCB_KHR) \
#else
#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) \
@ -1458,15 +1520,6 @@ XR_ENUM_STR(XrResult);
#define XR_LIST_STRUCTURE_TYPES_XR_USE_GRAPHICS_API_OPENGL_ES(_)
#endif
#if defined(XR_USE_GRAPHICS_API_OPENGL_ES) && defined(XR_USE_PLATFORM_ANDROID)
#define XR_LIST_STRUCTURE_TYPES_XR_USE_GRAPHICS_API_OPENGL_ES_XR_USE_PLATFORM_ANDROID(_) \
_(XrGraphicsBindingOpenGLESAndroidKHR, XR_TYPE_GRAPHICS_BINDING_OPENGL_ES_ANDROID_KHR) \
#else
#define XR_LIST_STRUCTURE_TYPES_XR_USE_GRAPHICS_API_OPENGL_ES_XR_USE_PLATFORM_ANDROID(_)
#endif
#if defined(XR_USE_GRAPHICS_API_VULKAN)
#define XR_LIST_STRUCTURE_TYPES_XR_USE_GRAPHICS_API_VULKAN(_) \
_(XrVulkanSwapchainFormatListCreateInfoKHR, XR_TYPE_VULKAN_SWAPCHAIN_FORMAT_LIST_CREATE_INFO_KHR) \
@ -1488,6 +1541,15 @@ XR_ENUM_STR(XrResult);
#define XR_LIST_STRUCTURE_TYPES_XR_USE_PLATFORM_ANDROID(_)
#endif
#if defined(XR_USE_PLATFORM_ANDROID) && defined(XR_USE_GRAPHICS_API_OPENGL_ES)
#define XR_LIST_STRUCTURE_TYPES_XR_USE_PLATFORM_ANDROID_XR_USE_GRAPHICS_API_OPENGL_ES(_) \
_(XrGraphicsBindingOpenGLESAndroidKHR, XR_TYPE_GRAPHICS_BINDING_OPENGL_ES_ANDROID_KHR) \
#else
#define XR_LIST_STRUCTURE_TYPES_XR_USE_PLATFORM_ANDROID_XR_USE_GRAPHICS_API_OPENGL_ES(_)
#endif
#if defined(XR_USE_PLATFORM_EGL)
#define XR_LIST_STRUCTURE_TYPES_XR_USE_PLATFORM_EGL(_) \
_(XrGraphicsBindingEGLMNDX, XR_TYPE_GRAPHICS_BINDING_EGL_MNDX) \
@ -1497,15 +1559,6 @@ XR_ENUM_STR(XrResult);
#define XR_LIST_STRUCTURE_TYPES_XR_USE_PLATFORM_EGL(_)
#endif
#if defined(XR_USE_PLATFORM_WAYLAND) && defined(XR_USE_GRAPHICS_API_OPENGL)
#define XR_LIST_STRUCTURE_TYPES_XR_USE_PLATFORM_WAYLAND_XR_USE_GRAPHICS_API_OPENGL(_) \
_(XrGraphicsBindingOpenGLWaylandKHR, XR_TYPE_GRAPHICS_BINDING_OPENGL_WAYLAND_KHR) \
#else
#define XR_LIST_STRUCTURE_TYPES_XR_USE_PLATFORM_WAYLAND_XR_USE_GRAPHICS_API_OPENGL(_)
#endif
#if defined(XR_USE_PLATFORM_WIN32)
#define XR_LIST_STRUCTURE_TYPES_XR_USE_PLATFORM_WIN32(_) \
_(XrHolographicWindowAttachmentMSFT, XR_TYPE_HOLOGRAPHIC_WINDOW_ATTACHMENT_MSFT) \
@ -1515,48 +1568,70 @@ XR_ENUM_STR(XrResult);
#define XR_LIST_STRUCTURE_TYPES_XR_USE_PLATFORM_WIN32(_)
#endif
#if defined(XR_USE_PLATFORM_WIN32) && defined(XR_USE_GRAPHICS_API_OPENGL)
#define XR_LIST_STRUCTURE_TYPES_XR_USE_PLATFORM_WIN32_XR_USE_GRAPHICS_API_OPENGL(_) \
_(XrGraphicsBindingOpenGLWin32KHR, XR_TYPE_GRAPHICS_BINDING_OPENGL_WIN32_KHR) \
#else
#define XR_LIST_STRUCTURE_TYPES_XR_USE_PLATFORM_WIN32_XR_USE_GRAPHICS_API_OPENGL(_)
#endif
#if defined(XR_USE_PLATFORM_XCB) && defined(XR_USE_GRAPHICS_API_OPENGL)
#define XR_LIST_STRUCTURE_TYPES_XR_USE_PLATFORM_XCB_XR_USE_GRAPHICS_API_OPENGL(_) \
_(XrGraphicsBindingOpenGLXcbKHR, XR_TYPE_GRAPHICS_BINDING_OPENGL_XCB_KHR) \
#else
#define XR_LIST_STRUCTURE_TYPES_XR_USE_PLATFORM_XCB_XR_USE_GRAPHICS_API_OPENGL(_)
#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(_) \
XR_LIST_STRUCTURE_TYPES_XR_USE_GRAPHICS_API_D3D12(_) \
XR_LIST_STRUCTURE_TYPES_XR_USE_GRAPHICS_API_OPENGL(_) \
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_OPENGL_ES_XR_USE_PLATFORM_ANDROID(_) \
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_WAYLAND_XR_USE_GRAPHICS_API_OPENGL(_) \
XR_LIST_STRUCTURE_TYPES_XR_USE_PLATFORM_WIN32(_) \
XR_LIST_STRUCTURE_TYPES_XR_USE_PLATFORM_WIN32_XR_USE_GRAPHICS_API_OPENGL(_) \
XR_LIST_STRUCTURE_TYPES_XR_USE_PLATFORM_XCB_XR_USE_GRAPHICS_API_OPENGL(_) \
XR_LIST_STRUCTURE_TYPES_XR_USE_PLATFORM_XLIB_XR_USE_GRAPHICS_API_OPENGL(_) \
#define XR_LIST_EXTENSIONS(_) \
_(XR_KHR_android_thread_settings, 4) \
_(XR_KHR_android_surface_swapchain, 5) \
_(XR_KHR_composition_layer_cube, 7) \
_(XR_KHR_android_create_instance, 9) \
_(XR_KHR_composition_layer_depth, 11) \
_(XR_KHR_vulkan_swapchain_format_list, 15) \
_(XR_EXT_performance_settings, 16) \
_(XR_EXT_thermal_query, 17) \
_(XR_KHR_composition_layer_cylinder, 18) \
_(XR_KHR_composition_layer_equirect, 19) \
_(XR_EXT_debug_utils, 20) \
_(XR_KHR_opengl_enable, 24) \
_(XR_KHR_opengl_es_enable, 25) \
_(XR_KHR_vulkan_enable, 26) \
_(XR_KHR_D3D11_enable, 28) \
_(XR_KHR_D3D12_enable, 29) \
_(XR_EXT_eye_gaze_interaction, 31) \
_(XR_KHR_visibility_mask, 32) \
_(XR_EXTX_overlay, 34) \
_(XR_KHR_win32_convert_performance_counter_time, 36) \
_(XR_KHR_convert_timespec_time, 37) \
_(XR_VARJO_quad_views, 38) \
_(XR_MSFT_unbounded_reference_space, 39) \
_(XR_MSFT_spatial_anchor, 40) \
_(XR_MND_headless, 43) \
_(XR_OCULUS_android_session_state_enable, 45) \
_(XR_EXT_view_configuration_depth_range, 47) \
_(XR_EXT_conformance_automation, 48) \
_(XR_MNDX_egl_enable, 49) \
_(XR_MSFT_spatial_graph_bridge, 50) \
_(XR_MSFT_hand_interaction, 51) \
_(XR_EXT_hand_tracking, 52) \
_(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_perception_anchor_interop_preview, 57) \
_(XR_EXT_win32_appcontainer_compatible, 58) \
_(XR_EPIC_view_configuration_fov, 60) \
_(XR_MSFT_spatial_anchor_export_preview, 63) \
_(XR_MSFT_holographic_window_attachment, 64) \
_(XR_HUAWEI_controller_interaction, 70) \
_(XR_VALVE_analog_threshold, 80) \
_(XR_EXT_samsung_odyssey_controller, 95) \
_(XR_EXT_hp_mixed_reality_controller, 96) \
_(XR_MND_swapchain_usage_input_attachment_bit, 97) \
#endif

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.props" Condition="Exists('..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.props')" />
<Import Project="..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.props" Condition="Exists('..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.props')" />
<Import Project="..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.props" Condition="Exists('..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.props')" />
<Import Project="..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.props" Condition="Exists('..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.props')" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
@ -162,16 +162,16 @@
<Import Project="$(VSINSTALLDIR)\Common7\IDE\Extensions\Microsoft\VsGraphics\ImageContentTask.targets" />
<Import Project="$(VSINSTALLDIR)\Common7\IDE\Extensions\Microsoft\VsGraphics\MeshContentTask.targets" />
<Import Project="$(VSINSTALLDIR)\Common7\IDE\Extensions\Microsoft\VsGraphics\ShaderGraphContentTask.targets" />
<Import Project="..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.targets" Condition="Exists('..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.targets')" />
<Import Project="..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.targets" Condition="Exists('..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.targets')" />
<Import Project="..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.targets" Condition="Exists('..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.targets')" />
<Import Project="..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.targets" Condition="Exists('..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.props'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.targets'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.props'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.targets'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.props'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.targets'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.props'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.targets'))" />
</Target>
</Project>

Просмотреть файл

@ -47,7 +47,7 @@
<None Include="TemporaryKey.pfx">
<Filter>Assets</Filter>
</None>
<None Include="packages.config" />
<None Include="$(OpenXRLoaderBinaryRoot)\bin\openxr_loader.dll" />
<None Include="packages.config" />
</ItemGroup>
</Project>

Просмотреть файл

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.props" Condition="Exists('..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.props')" />
<Import Project="..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.props" Condition="Exists('..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.props')" />
<Import Project="..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.props" Condition="Exists('..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.props')" />
<Import Project="..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.props" Condition="Exists('..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.props')" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@ -114,16 +114,16 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.targets" Condition="Exists('..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.targets')" />
<Import Project="..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.targets" Condition="Exists('..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.targets')" />
<Import Project="..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.targets" Condition="Exists('..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.targets')" />
<Import Project="..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.targets" Condition="Exists('..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.props'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.targets'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.props'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.targets'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.props'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.targets'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.props'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.targets'))" />
</Target>
</Project>

Просмотреть файл

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="OpenXR.Headers" version="1.0.10.1" targetFramework="native" />
<package id="OpenXR.Loader" version="1.0.10.1" targetFramework="native" />
<package id="OpenXR.Headers" version="1.0.10.2" targetFramework="native" />
<package id="OpenXR.Loader" version="1.0.10.2" targetFramework="native" />
</packages>

Просмотреть файл

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.props" Condition="Exists('..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.props')" />
<Import Project="..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.props" Condition="Exists('..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.props')" />
<Import Project="..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.props" Condition="Exists('..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.props')" />
<Import Project="..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.props" Condition="Exists('..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.props')" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
@ -154,16 +154,16 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.targets" Condition="Exists('..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.targets')" />
<Import Project="..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.targets" Condition="Exists('..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.targets')" />
<Import Project="..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.targets" Condition="Exists('..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.targets')" />
<Import Project="..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.targets" Condition="Exists('..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.props'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.targets'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.props'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.targets'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.props'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.targets'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.props'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.targets'))" />
</Target>
</Project>

Просмотреть файл

@ -9,9 +9,9 @@
<ClInclude Include="pch.h" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="TemporaryKey.pfx" />
<None Include="$(OpenXRLoaderBinaryRoot)\bin\openxr_loader.dll" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Filter Include="DeploymentContent">

Просмотреть файл

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="OpenXR.Headers" version="1.0.10.1" targetFramework="native" />
<package id="OpenXR.Loader" version="1.0.10.1" targetFramework="native" />
<package id="OpenXR.Headers" version="1.0.10.2" targetFramework="native" />
<package id="OpenXR.Loader" version="1.0.10.2" targetFramework="native" />
</packages>

Просмотреть файл

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.props" Condition="Exists('..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.props')" />
<Import Project="..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.props" Condition="Exists('..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.props')" />
<Import Project="..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.props" Condition="Exists('..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.props')" />
<Import Project="..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.props" Condition="Exists('..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.props')" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
@ -153,16 +153,16 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.targets" Condition="Exists('..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.targets')" />
<Import Project="..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.targets" Condition="Exists('..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.targets')" />
<Import Project="..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.targets" Condition="Exists('..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.targets')" />
<Import Project="..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.targets" Condition="Exists('..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.props'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.targets'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.props'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.targets'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.props'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.targets'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.props'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.targets'))" />
</Target>
</Project>

Просмотреть файл

@ -14,8 +14,8 @@
</ItemGroup>
<ItemGroup>
<None Include="TemporaryKey.pfx" />
<None Include="$(OpenXRLoaderBinaryRoot)\bin\openxr_loader.dll" />
<None Include="packages.config" />
<None Include="$(OpenXRLoaderBinaryRoot)\bin\openxr_loader.dll" />
</ItemGroup>
<ItemGroup>
<Filter Include="DeploymentContent">

Просмотреть файл

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="OpenXR.Headers" version="1.0.10.1" targetFramework="native" />
<package id="OpenXR.Loader" version="1.0.10.1" targetFramework="native" />
<package id="OpenXR.Headers" version="1.0.10.2" targetFramework="native" />
<package id="OpenXR.Loader" version="1.0.10.2" targetFramework="native" />
</packages>

Просмотреть файл

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.props" Condition="Exists('..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.props')" />
<Import Project="..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.props" Condition="Exists('..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.props')" />
<Import Project="..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.props" Condition="Exists('..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.props')" />
<Import Project="..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.props" Condition="Exists('..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.props')" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@ -118,16 +118,16 @@
<Copy DestinationFolder="$(OutDir)" SkipUnchangedFiles="True" SourceFiles="@(ContentFiles)" UseHardlinksIfPossible="True" />
</Target>
<ImportGroup Label="ExtensionTargets">
<Import Project="..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.targets" Condition="Exists('..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.targets')" />
<Import Project="..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.targets" Condition="Exists('..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.targets')" />
<Import Project="..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.targets" Condition="Exists('..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.targets')" />
<Import Project="..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.targets" Condition="Exists('..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.props'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.targets'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.props'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.targets'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.props'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.targets'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.props'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.targets'))" />
</Target>
</Project>

Просмотреть файл

@ -34,6 +34,26 @@ namespace {
{m_gripPoseAction, "/user/hand/left/input/grip"},
});
ActionContext().SuggestInteractionProfileBindings("/interaction_profiles/oculus/touch_controller",
{
{m_gripPoseAction, "/user/hand/right/input/grip"},
{m_gripPoseAction, "/user/hand/left/input/grip"},
});
ActionContext().SuggestInteractionProfileBindings("/interaction_profiles/khr/simple_controller",
{
{m_gripPoseAction, "/user/hand/right/input/grip"},
{m_gripPoseAction, "/user/hand/left/input/grip"},
});
if (context.Extensions.SupportsHPMixedRealityController) {
ActionContext().SuggestInteractionProfileBindings("/interaction_profiles/hp/mixed_reality_controller",
{
{m_gripPoseAction, "/user/hand/right/input/grip"},
{m_gripPoseAction, "/user/hand/left/input/grip"},
});
}
XrActionSpaceCreateInfo actionSpaceCreateInfo{XR_TYPE_ACTION_SPACE_CREATE_INFO};
actionSpaceCreateInfo.poseInActionSpace = xr::math::Pose::Identity();

Просмотреть файл

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="OpenXR.Headers" version="1.0.10.1" targetFramework="native" />
<package id="OpenXR.Loader" version="1.0.10.1" targetFramework="native" />
<package id="OpenXR.Headers" version="1.0.10.2" targetFramework="native" />
<package id="OpenXR.Loader" version="1.0.10.2" targetFramework="native" />
</packages>

Просмотреть файл

@ -14,6 +14,7 @@
//
//*********************************************************
#include "pch.h"
#include <XrUtility/XrToString.h>
#include <XrSceneLib/PbrModelObject.h>
#include <XrSceneLib/Scene.h>
@ -65,26 +66,35 @@ namespace {
referenceSpaceCreateInfo.poseInReferenceSpace = Pose::Identity();
CHECK_XRCMD(xrCreateReferenceSpace(m_context.Session.Handle, &referenceSpaceCreateInfo, m_localSpace.Put()));
// Create an axis at the origin of the LOCAL space
m_holograms.emplace_back(m_localSpace.Get(),
AddObject(engine::CreateAxis(m_context.PbrResources, 0.1f /*length*/, 0.05f /*thickness*/)));
if (m_context.Extensions.SupportsUnboundedSpace) {
referenceSpaceCreateInfo.referenceSpaceType = XR_REFERENCE_SPACE_TYPE_UNBOUNDED_MSFT;
CHECK_XRCMD(xrCreateReferenceSpace(m_context.Session.Handle, &referenceSpaceCreateInfo, m_unboundedSpace.Put()));
// Create a thin axis at the origin of the UNBOUNDED space
m_holograms.emplace_back(m_unboundedSpace.Get(),
AddObject(engine::CreateAxis(m_context.PbrResources, 0.2f /*length*/, 0.01f /*thickness*/)));
}
XrActionSpaceCreateInfo spaceCreateInfo{XR_TYPE_ACTION_SPACE_CREATE_INFO};
spaceCreateInfo.poseInActionSpace = Pose::Identity();
spaceCreateInfo.action = m_aimPoseAction;
spaceCreateInfo.poseInActionSpace = Pose::Translation({0, 0, -0.1f});
// Place the cursor in front of hand so that the cubes can be created on the surface.
spaceCreateInfo.poseInActionSpace = Pose::Translation({0, 0, -0.05f});
spaceCreateInfo.subactionPath = m_context.RightHand;
CHECK_XRCMD(xrCreateActionSpace(m_context.Session.Handle, &spaceCreateInfo, m_rightAimSpace.Put()));
spaceCreateInfo.subactionPath = m_context.LeftHand;
CHECK_XRCMD(xrCreateActionSpace(m_context.Session.Handle, &spaceCreateInfo, m_leftAimSpace.Put()));
m_holograms.emplace_back(m_rightAimSpace.Get(),
AddObject(engine::CreateSphere(m_context.PbrResources, 0.05f, 20, Pbr::FromSRGB(Colors::Magenta))));
AddObject(engine::CreateSphere(m_context.PbrResources, 0.05f, 20, Pbr::FromSRGB(Colors::Magenta))));
m_holograms.emplace_back(m_leftAimSpace.Get(),
AddObject(engine::CreateSphere(m_context.PbrResources, 0.05f, 20, Pbr::FromSRGB(Colors::Cyan))));
AddObject(engine::CreateSphere(m_context.PbrResources, 0.05f, 20, Pbr::FromSRGB(Colors::Cyan))));
}
void OnUpdate(const engine::FrameTime& frameTime) override {
@ -109,6 +119,12 @@ namespace {
}
}
void OnEvent(const XrEventDataBuffer& eventData [[maybe_unused]]) override {
if (auto* referenceSpaceChangePending = xr::event_cast<XrEventDataReferenceSpaceChangePending>(&eventData)) {
sample::Trace("Reference space change pending: {}", xr::ToCString(referenceSpaceChangePending->referenceSpaceType));
}
}
private:
struct Hologram;
void UpdateHologramPlacement(Hologram& hologram, XrTime time) {
@ -126,7 +142,6 @@ namespace {
} else {
hologram.Object->Pose() = spaceLocation.pose;
}
} else {
hologram.Object->SetVisible(false);
}
@ -144,11 +159,14 @@ namespace {
XrSpaceLocation spaceLocation{XR_TYPE_SPACE_LOCATION};
CHECK_XRCMD(xrLocateSpace(space, baseSpace, time, &spaceLocation));
Hologram hologram;
hologram.Object = AddObject(engine::CreateCube(m_context.PbrResources, sideLength, color));
hologram.Space = baseSpace;
hologram.Pose = Pose::Multiply(Pose::Translation(offset), spaceLocation.pose);
m_holograms.emplace_back(std::move(hologram));
// Only create a new hologram if the space is tracked
if (xr::math::Pose::IsPoseTracked(spaceLocation)) {
Hologram hologram;
hologram.Object = AddObject(engine::CreateCube(m_context.PbrResources, sideLength, color));
hologram.Space = baseSpace;
hologram.Pose = Pose::Multiply(Pose::Translation(offset), spaceLocation.pose);
m_holograms.emplace_back(std::move(hologram));
}
};
createHologram(m_localSpace.Get(), Pbr::FromSRGB(Colors::Red), {-cubeSize, 0, 0});
@ -172,9 +190,7 @@ namespace {
createInfo.time = time;
XrResult result = m_context.Extensions.xrCreateSpatialAnchorMSFT(
m_context.Session.Handle,
&createInfo,
anchorSpace.Anchor.Put(m_context.Extensions.xrDestroySpatialAnchorMSFT));
m_context.Session.Handle, &createInfo, anchorSpace.Anchor.Put(m_context.Extensions.xrDestroySpatialAnchorMSFT));
if (result == XR_ERROR_CREATE_SPATIAL_ANCHOR_FAILED_MSFT) {
// Cannot create spatial anchor at this place
return XR_NULL_HANDLE;
@ -187,8 +203,8 @@ namespace {
XrSpatialAnchorSpaceCreateInfoMSFT createInfo{XR_TYPE_SPATIAL_ANCHOR_SPACE_CREATE_INFO_MSFT};
createInfo.anchor = anchorSpace.Anchor.Get();
createInfo.poseInAnchorSpace = Pose::Identity();
CHECK_XRCMD(m_context.Extensions.xrCreateSpatialAnchorSpaceMSFT(
m_context.Session.Handle, &createInfo, anchorSpace.Space.Put()));
CHECK_XRCMD(
m_context.Extensions.xrCreateSpatialAnchorSpaceMSFT(m_context.Session.Handle, &createInfo, anchorSpace.Space.Put()));
}
// Keep a copy of the handles to keep the anchor and space alive.

Просмотреть файл

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.props" Condition="Exists('..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.props')" />
<Import Project="..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.props" Condition="Exists('..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.props')" />
<Import Project="..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.props" Condition="Exists('..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.props')" />
<Import Project="..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.props" Condition="Exists('..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.props')" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
@ -154,16 +154,16 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.targets" Condition="Exists('..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.targets')" />
<Import Project="..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.targets" Condition="Exists('..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.targets')" />
<Import Project="..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.targets" Condition="Exists('..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.targets')" />
<Import Project="..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.targets" Condition="Exists('..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.props'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.targets'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.props'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Loader.1.0.10.1\build\native\OpenXR.Loader.targets'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.props'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.targets'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.props'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.targets'))" />
</Target>
</Project>

Просмотреть файл

@ -9,9 +9,9 @@
<ClInclude Include="pch.h" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="TemporaryKey.pfx" />
<None Include="$(OpenXRLoaderBinaryRoot)\bin\openxr_loader.dll" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Filter Include="DeploymentContent">

Просмотреть файл

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="OpenXR.Headers" version="1.0.10.1" targetFramework="native" />
<package id="OpenXR.Loader" version="1.0.10.1" targetFramework="native" />
<package id="OpenXR.Headers" version="1.0.10.2" targetFramework="native" />
<package id="OpenXR.Loader" version="1.0.10.2" targetFramework="native" />
</packages>

Просмотреть файл

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.props" Condition="Exists('..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.props')" />
<Import Project="..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.props" Condition="Exists('..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.props')" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
@ -372,7 +372,6 @@
<Image Include="UWPAssets\storeLogo-sdk.png" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="Sample_DiffuseHDR.dds">
<DeploymentContent>true</DeploymentContent>
</None>
@ -380,15 +379,18 @@
<DeploymentContent>true</DeploymentContent>
</None>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.targets" Condition="Exists('..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.targets')" />
<Import Project="..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.targets" Condition="Exists('..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.props'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.targets'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.props'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.targets'))" />
</Target>
</Project>

Просмотреть файл

@ -41,10 +41,9 @@
</Filter>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="Sample_DiffuseHDR.dds" />
<None Include="Sample_SpecularHDR.dds" />
<None Include="$(OpenXRLoaderBinaryRoot)\bin\openxr_loader.dll" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Image Include="UWPAssets\smallTile-sdk.png">

Просмотреть файл

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.props" Condition="Exists('..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.props')" />
<Import Project="..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.props" Condition="Exists('..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.props')" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
@ -349,7 +349,7 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.targets" Condition="Exists('..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.targets')" />
<Import Project="..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.targets" Condition="Exists('..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.targets')" />
</ImportGroup>
<Target Name="AfterBuild">
<Copy SourceFiles="Sample_SpecularHDR.dds" DestinationFolder="$(OutDir)" SkipUnchangedFiles="True" />
@ -359,7 +359,7 @@
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.props'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.targets'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.props'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.targets'))" />
</Target>
</Project>

Просмотреть файл

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="OpenXR.Headers" version="1.0.10.1" targetFramework="native" />
<package id="OpenXR.Headers" version="1.0.10.2" targetFramework="native" />
</packages>

Просмотреть файл

@ -21,7 +21,7 @@ namespace engine {
class CompositionLayers;
void AppendQuadLayer(CompositionLayers& layers, QuadLayerObject* quad);
void AppendProjectionLayer(CompositionLayers& layers, const ProjectionLayer* layer, XrViewConfigurationType type);
void AppendProjectionLayer(CompositionLayers& layers, ProjectionLayer* layer, XrViewConfigurationType type);
class CompositionLayers {
public:

Просмотреть файл

@ -16,6 +16,7 @@
#include "pch.h"
#include <Pbr/GltfLoader.h>
#include <SampleShared/Trace.h>
#include "PbrModelObject.h"
#include "ControllerObject.h"
#include "Context.h"
@ -39,13 +40,7 @@ namespace {
// Load the controller model as GLTF binary stream using two call idiom
uint32_t bufferSize = 0;
XrResult result = context.Extensions.xrLoadControllerModelMSFT(context.Session.Handle, modelKey, 0, &bufferSize, nullptr);
if (result == XR_ERROR_CONTROLLER_MODEL_UNAVAILABLE_MSFT) {
// The controller model is not ready yet; early return and let the app try again in the next frame
return nullptr;
}
CHECK_XRRESULT(result, "xrLoadControllerModelMSFT");
CHECK_XRCMD(context.Extensions.xrLoadControllerModelMSFT(context.Session.Handle, modelKey, 0, &bufferSize, nullptr));
auto modelBuffer = std::make_unique<byte[]>(bufferSize);
CHECK_XRCMD(context.Extensions.xrLoadControllerModelMSFT(
context.Session.Handle, modelKey, bufferSize, &bufferSize, modelBuffer.get()));
@ -141,7 +136,11 @@ namespace {
// If controller model loading task is completed, get the result model and apply it to rendering.
if (m_modelLoadingTask.valid() && m_modelLoadingTask.wait_for(0s) == std::future_status::ready) {
m_model = m_modelLoadingTask.get(); // future.valid() is reset to false after get()
try {
m_model = m_modelLoadingTask.get(); // future.valid() is reset to false after get()
} catch (...) {
sample::Trace("Unexpected failure loading controller model");
}
if (m_model) {
SetModel(m_model->PbrModel);
}

Просмотреть файл

@ -324,7 +324,7 @@ bool engine::ProjectionLayer::Render(Context& context,
return submitProjectionLayer;
}
void engine::AppendProjectionLayer(CompositionLayers& layers, const ProjectionLayer* layer, XrViewConfigurationType viewConfig) {
void engine::AppendProjectionLayer(CompositionLayers& layers, ProjectionLayer* layer, XrViewConfigurationType viewConfig) {
XrCompositionLayerProjection& projectionLayer = layers.AddProjectionLayer(layer->Config(viewConfig).LayerFlags);
projectionLayer.space = layer->LayerSpace(viewConfig);
projectionLayer.viewCount = (uint32_t)layer->ProjectionViews(viewConfig).size();

Просмотреть файл

@ -37,7 +37,7 @@ namespace {
CHECK_XRCMD(xrCreateReferenceSpace(m_context.Session.Handle, &createInfo, m_viewSpace.Put()));
constexpr float margin = 0.01f;
constexpr float titleWidth = 0.5f;
constexpr float titleWidth = 0.6f;
constexpr float titleHeight = titleWidth / 3;
const auto& material = Pbr::Material::CreateFlat(m_context.PbrResources, Pbr::FromSRGB(Colors::DarkGray));
m_background = AddObject(engine::CreateQuad(m_context.PbrResources, {titleWidth, titleHeight}, material));
@ -83,11 +83,11 @@ namespace {
XrSpaceLocation viewInScene = {XR_TYPE_SPACE_LOCATION};
CHECK_XRCMD(xrLocateSpace(m_viewSpace.Get(), m_context.SceneSpace, frameTime.PredictedDisplayTime, &viewInScene));
if (Pose::IsPoseValid(viewInScene)) {
XrPosef titleInView = {{0, 0, 0, 1}, {0, 0, -1.f}}; // 1 meter in front
XrPosef titleInView = {{0, 0, 0, 1}, {0, 0, -2.0f}}; // 2.0 meter in front
XrPosef titleInScene = titleInView * viewInScene.pose;
titleInScene.position.y = 0.5f; // floating in the top of user's view
XrVector3f forward = titleInScene.position - viewInScene.pose.position;
m_targetPose = Pose::LookAt(titleInScene.position, forward, {0, 1, 0});
m_targetPose.position.y += 0.25f; // floating in the top of user's view
if (!m_background->IsVisible()) {
m_background->SetVisible(true);

Просмотреть файл

@ -74,8 +74,9 @@ namespace {
XR_MSFT_UNBOUNDED_REFERENCE_SPACE_EXTENSION_NAME,
XR_MSFT_SECONDARY_VIEW_CONFIGURATION_EXTENSION_NAME,
XR_MSFT_FIRST_PERSON_OBSERVER_EXTENSION_NAME,
XR_EXT_HP_MIXED_REALITY_CONTROLLER_EXTENSION_NAME,
#if UWP
XR_MSFT_HOLOGRAPHIC_WINDOW_ATTACHMENT_PREVIEW_EXTENSION_NAME,
XR_MSFT_HOLOGRAPHIC_WINDOW_ATTACHMENT_EXTENSION_NAME,
XR_EXT_WIN32_APPCONTAINER_COMPATIBLE_EXTENSION_NAME,
#endif
};
@ -240,7 +241,8 @@ namespace {
CHECK_XRCMD(xrCreateReferenceSpace(session.Handle, &spaceCreateInfo, m_viewSpace.Put()));
// Create main app space
spaceCreateInfo.referenceSpaceType = XR_REFERENCE_SPACE_TYPE_LOCAL;
spaceCreateInfo.referenceSpaceType =
extensions.SupportsUnboundedSpace ? XR_REFERENCE_SPACE_TYPE_UNBOUNDED_MSFT : XR_REFERENCE_SPACE_TYPE_LOCAL;
CHECK_XRCMD(xrCreateReferenceSpace(session.Handle, &spaceCreateInfo, m_sceneSpace.Put()));
Pbr::Resources pbrResources = sample::InitializePbrResources(device.get());

Просмотреть файл

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.props" Condition="Exists('..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.props')" />
<Import Project="..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.props" Condition="Exists('..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.props')" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
@ -151,13 +151,13 @@
<ClCompile Include="Scene_Title.cpp" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(SharedPath)\gltf\Gltf_uwp.vcxproj">
<ProjectReference Include="..\gltf\Gltf_uwp.vcxproj">
<Project>{63475578-0c83-4b2f-9ac5-a4513de2907f}</Project>
</ProjectReference>
<ProjectReference Include="$(SharedPath)\pbr\pbr_uwp.vcxproj">
<ProjectReference Include="..\pbr\pbr_uwp.vcxproj">
<Project>{334e53b6-28dc-4f46-a7d9-ccec681f4feb}</Project>
</ProjectReference>
<ProjectReference Include="$(SharedPath)\SampleShared\SampleShared_uwp.vcxproj">
<ProjectReference Include="..\SampleShared\SampleShared_uwp.vcxproj">
<Project>{7a3653fd-90a8-4627-9185-f3eefa539f49}</Project>
</ProjectReference>
</ItemGroup>
@ -166,13 +166,14 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.targets" Condition="Exists('..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.targets')" />
<Import Project="..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.targets" Condition="Exists('..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.props'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.targets'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.props'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.targets'))" />
</Target>
</Project>
</Project>

Просмотреть файл

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.props" Condition="Exists('..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.props')" />
<Import Project="..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.props" Condition="Exists('..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.props')" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
@ -144,13 +144,13 @@
<ClCompile Include="Scene_Title.cpp" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(SharedPath)\gltf\Gltf_win32.vcxproj">
<ProjectReference Include="..\gltf\Gltf_win32.vcxproj">
<Project>{6a3225a3-0750-47b7-8004-80ca543f8b8b}</Project>
</ProjectReference>
<ProjectReference Include="$(SharedPath)\pbr\pbr_win32.vcxproj">
<ProjectReference Include="..\pbr\pbr_win32.vcxproj">
<Project>{2b7688f8-9ae6-4a67-809b-1bac82094f21}</Project>
</ProjectReference>
<ProjectReference Include="$(SharedPath)\SampleShared\SampleShared_win32.vcxproj">
<ProjectReference Include="..\SampleShared\SampleShared_win32.vcxproj">
<Project>{269c12fa-e68d-470b-a734-4701034306bd}</Project>
</ProjectReference>
</ItemGroup>
@ -159,13 +159,14 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.targets" Condition="Exists('..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.targets')" />
<Import Project="..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.targets" Condition="Exists('..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.props'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Headers.1.0.10.1\build\native\OpenXR.Headers.targets'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.props'))" />
<Error Condition="!Exists('..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.targets'))" />
</Target>
</Project>
</Project>

Просмотреть файл

@ -86,7 +86,6 @@
</Filter>
</ItemGroup>
<ItemGroup>
<None Include="$(OpenXRLoaderBinaryRoot)\bin\openxr_loader.dll" />
<None Include="packages.config" />
</ItemGroup>
</Project>

Просмотреть файл

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="OpenXR.Headers" version="1.0.10.1" targetFramework="native" />
<package id="OpenXR.Headers" version="1.0.10.2" targetFramework="native" />
</packages>

Просмотреть файл

@ -16,6 +16,8 @@
#pragma once
#include <set>
#include <list>
#include <unordered_map>
#include "XrString.h"
#include "XrHandle.h"

Просмотреть файл

@ -36,6 +36,10 @@ namespace xr {
bool SupportsSecondaryViewConfiguration;
bool SupportsAppContainer;
bool SupportsHolographicWindowAttachment;
bool SupportsSamsungOdysseyController;
bool SupportsHPMixedRealityController;
bool SupportsSpatialAnchorExport;
bool SupportsPerceptionAnchorInterop;
std::vector<const char*> EnabledExtensions;
};
@ -78,7 +82,11 @@ namespace xr {
extensions.SupportsSpatialGraphBridge = isExtensionEnabled(XR_MSFT_SPATIAL_GRAPH_BRIDGE_EXTENSION_NAME);
extensions.SupportsControllerModel = isExtensionEnabled(XR_MSFT_CONTROLLER_MODEL_PREVIEW_EXTENSION_NAME);
extensions.SupportsAppContainer = isExtensionEnabled(XR_EXT_WIN32_APPCONTAINER_COMPATIBLE_EXTENSION_NAME);
extensions.SupportsHolographicWindowAttachment = isExtensionEnabled(XR_MSFT_HOLOGRAPHIC_WINDOW_ATTACHMENT_PREVIEW_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);
return extensions;
}

Просмотреть файл

@ -16,43 +16,94 @@
#pragma once
#ifdef XR_USE_PLATFORM_WIN32
#define FOR_EACH_WIN32_EXTENSION_FUNCTION(_) \
_(xrConvertWin32PerformanceCounterToTimeKHR)
#define FOR_EACH_WIN32_EXTENSION_FUNCTION(_) _(xrConvertWin32PerformanceCounterToTimeKHR)
#else
#define FOR_EACH_WIN32_EXTENSION_FUNCTION(_)
#endif
#ifdef XR_USE_GRAPHICS_API_D3D11
#define FOR_EACH_D3D11_EXTENSION_FUNCTION(_) \
_(xrGetD3D11GraphicsRequirementsKHR)
#define FOR_EACH_D3D11_EXTENSION_FUNCTION(_) _(xrGetD3D11GraphicsRequirementsKHR)
#else
#define FOR_EACH_D3D11_EXTENSION_FUNCTION(_)
#endif
#ifdef XR_MSFT_CONTROLLER_MODEL_PREVIEW_EXTENSION_NAME
#if XR_KHR_visibility_mask
#define FOR_EACH_VISIBILITY_MASK_FUNCTION(_) _(xrGetVisibilityMaskKHR)
#else
#define FOR_EACH_VISIBILITY_MASK_FUNCTION(_)
#endif
#ifdef XR_MSFT_controller_model_preview
#define FOR_EACH_CONTROLLER_MODEL_EXTENSION_FUNCTION(_) \
_(xrGetControllerModelKeyMSFT) \
_(xrLoadControllerModelMSFT) \
_(xrGetControllerModelPropertiesMSFT) \
_(xrGetControllerModelKeyMSFT) \
_(xrLoadControllerModelMSFT) \
_(xrGetControllerModelPropertiesMSFT) \
_(xrGetControllerModelStateMSFT)
#else
#define FOR_EACH_CONTROLLER_MODEL_EXTENSION_FUNCTION(_)
#endif
#if XR_MSFT_perception_anchor_interop_preview && defined(XR_USE_PLATFORM_WIN32)
#define FOR_EACH_PERCEPTION_ANCHOR_INTEROP_FUNCTION(_) \
_(xrCreateSpatialAnchorFromPerceptionAnchorMSFT) \
_(xrTryGetPerceptionAnchorFromSpatialAnchorMSFT)
#else
#define FOR_EACH_PERCEPTION_ANCHOR_INTEROP_FUNCTION(_)
#endif
#if XR_MSFT_spatial_anchor_export_preview
#define FOR_EACH_SPATIAL_ANCHOR_EXPORT_FUNCTION(_) \
_(xrCreateSpatialAnchorNeighborhoodDataStreamMSFT) \
_(xrReadSpatialAnchorNeighborhoodDataMSFT) \
_(xrGetSpatialAnchorExportSufficiencyMSFT) \
_(xrDestroySpatialAnchorNeighborhoodDataStreamMSFT)
#else
#define FOR_EACH_PERCEPTION_ANCHOR_INTEROP_FUNCTION(_)
#endif
#if XR_MSFT_spatial_anchor
#define FOR_EACH_SPATIAL_ANCHOR_FUNCTION(_) \
_(xrCreateSpatialAnchorMSFT) \
_(xrCreateSpatialAnchorSpaceMSFT) \
_(xrDestroySpatialAnchorMSFT)
#else
#define FOR_EACH_SPATIAL_ANCHOR_FUNCTION(_)
#endif
#if XR_EXT_hand_tracking
#define FOR_EACH_HAND_TRACKING_FUNCTION(_) \
_(xrCreateHandTrackerEXT) \
_(xrDestroyHandTrackerEXT) \
_(xrLocateHandJointsEXT)
#else
#define FOR_EACH_HAND_TRACKING_FUNCTION(_)
#endif
#if XR_MSFT_hand_tracking_mesh
#define FOR_EACH_HAND_TRACKING_MESH_FUNCTION(_) \
_(xrCreateHandMeshSpaceMSFT) \
_(xrUpdateHandMeshMSFT)
#else
#define FOR_EACH_HAND_TRACKING_MESH_FUNCTION(_)
#endif
#if XR_MSFT_spatial_graph_bridge
#define FOR_EACH_SPATIAL_GRAPH_BRIDGE_FUNCTION(_) _(xrCreateSpatialGraphNodeSpaceMSFT)
#else
#define FOR_EACH_SPATIAL_GRAPH_BRIDGE_FUNCTION(_)
#endif
#define FOR_EACH_EXTENSION_FUNCTION(_) \
_(xrCreateSpatialAnchorMSFT) \
_(xrCreateSpatialAnchorSpaceMSFT) \
_(xrDestroySpatialAnchorMSFT) \
_(xrCreateHandTrackerEXT) \
_(xrDestroyHandTrackerEXT) \
_(xrLocateHandJointsEXT) \
_(xrCreateHandMeshSpaceMSFT) \
_(xrUpdateHandMeshMSFT) \
_(xrCreateSpatialGraphNodeSpaceMSFT) \
_(xrGetVisibilityMaskKHR) \
FOR_EACH_WIN32_EXTENSION_FUNCTION(_) \
FOR_EACH_D3D11_EXTENSION_FUNCTION(_) \
FOR_EACH_CONTROLLER_MODEL_EXTENSION_FUNCTION(_)
FOR_EACH_VISIBILITY_MASK_FUNCTION(_) \
FOR_EACH_HAND_TRACKING_FUNCTION(_) \
FOR_EACH_HAND_TRACKING_MESH_FUNCTION(_) \
FOR_EACH_SPATIAL_GRAPH_BRIDGE_FUNCTION(_) \
FOR_EACH_SPATIAL_ANCHOR_FUNCTION(_) \
FOR_EACH_CONTROLLER_MODEL_EXTENSION_FUNCTION(_) \
FOR_EACH_PERCEPTION_ANCHOR_INTEROP_FUNCTION(_) \
FOR_EACH_SPATIAL_ANCHOR_EXPORT_FUNCTION(_)
#define GET_INSTANCE_PROC_ADDRESS(name) \
(void)xrGetInstanceProcAddr(instance, #name, reinterpret_cast<PFN_xrVoidFunction*>(const_cast<PFN_##name*>(&name)));

Просмотреть файл

@ -329,7 +329,9 @@
<PrecompiledHeader>Create</PrecompiledHeader>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
<ImportGroup Label="ExtensionTargets" />
</Project>

Просмотреть файл

@ -15,4 +15,7 @@
<ClInclude Include="GltfHelper.h" />
<ClInclude Include="pch.h" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
</Project>

Просмотреть файл

@ -311,6 +311,9 @@
<PrecompiledHeader>Create</PrecompiledHeader>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>

Просмотреть файл

@ -371,20 +371,9 @@
</Image>
</ItemGroup>
<ItemGroup>
<None Include="Shaders\Shared.hlsl">
<FileType>Document</FileType>
<ShaderModel>5.0</ShaderModel>
<VariableName>g_%(Filename)</VariableName>
<HeaderFileOutput>$(IntDir)\%(Filename).h</HeaderFileOutput>
<ObjectFileOutput />
</None>
<None Include="Shaders\PbrShared.hlsl">
<FileType>Document</FileType>
<ShaderModel>5.0</ShaderModel>
<VariableName>g_%(Filename)</VariableName>
<HeaderFileOutput>$(IntDir)\%(Filename).h</HeaderFileOutput>
<ObjectFileOutput />
</None>
<None Include="packages.config" />
<None Include="Shaders\Shared.hlsl" />
<None Include="Shaders\PbrShared.hlsl" />
<FxCompile Include="Shaders\PbrPixelShader.hlsl">
<FileType>Document</FileType>
<ShaderType>Pixel</ShaderType>
@ -398,6 +387,7 @@
<FxCompile Include="Shaders\PbrVertexShader.hlsl">
<FileType>Document</FileType>
<DeploymentContent>false</DeploymentContent>
<ExcludedFromBuild/>
<ShaderType>Vertex</ShaderType>
<ShaderModel>5.0</ShaderModel>
<VariableName>g_%(Filename)</VariableName>
@ -405,13 +395,7 @@
<HeaderFileOutput>$(IntDir)\%(Filename).h</HeaderFileOutput>
<DeploymentContent />
</FxCompile>
<None Include="Shaders\HighlightShared.hlsl">
<FileType>Document</FileType>
<ShaderModel>5.0</ShaderModel>
<VariableName>g_%(Filename)</VariableName>
<HeaderFileOutput>$(IntDir)\%(Filename).h</HeaderFileOutput>
<ObjectFileOutput />
</None>
<None Include="Shaders\HighlightShared.hlsl" />
<FxCompile Include="Shaders\HighlightPixelShader.hlsl">
<ShaderType>Pixel</ShaderType>
<ShaderModel>5.0</ShaderModel>
@ -428,6 +412,5 @@
</FxCompile>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
<ImportGroup Label="ExtensionTargets" />
</Project>

Просмотреть файл

@ -55,5 +55,6 @@
<None Include="Shaders\PbrShared.hlsl">
<Filter>Shaders</Filter>
</None>
<None Include="packages.config" />
</ItemGroup>
</Project>

Просмотреть файл

@ -347,20 +347,9 @@
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="Shaders\Shared.hlsl">
<FileType>Document</FileType>
<ShaderModel>5.0</ShaderModel>
<VariableName>g_%(Filename)</VariableName>
<HeaderFileOutput>$(IntDir)\%(Filename).h</HeaderFileOutput>
<ObjectFileOutput />
</None>
<None Include="Shaders\PbrShared.hlsl">
<FileType>Document</FileType>
<ShaderModel>5.0</ShaderModel>
<VariableName>g_%(Filename)</VariableName>
<HeaderFileOutput>$(IntDir)\%(Filename).h</HeaderFileOutput>
<ObjectFileOutput />
</None>
<None Include="packages.config" />
<None Include="Shaders\Shared.hlsl" />
<None Include="Shaders\PbrShared.hlsl" />
<FxCompile Include="Shaders\PbrPixelShader.hlsl">
<FileType>Document</FileType>
<ShaderType>Pixel</ShaderType>
@ -374,6 +363,7 @@
<FxCompile Include="Shaders\PbrVertexShader.hlsl">
<FileType>Document</FileType>
<DeploymentContent>false</DeploymentContent>
<ExcludedFromBuild/>
<ShaderType>Vertex</ShaderType>
<ShaderModel>5.0</ShaderModel>
<VariableName>g_%(Filename)</VariableName>
@ -381,13 +371,7 @@
<HeaderFileOutput>$(IntDir)\%(Filename).h</HeaderFileOutput>
<DeploymentContent />
</FxCompile>
<None Include="Shaders\HighlightShared.hlsl">
<FileType>Document</FileType>
<ShaderModel>5.0</ShaderModel>
<VariableName>g_%(Filename)</VariableName>
<HeaderFileOutput>$(IntDir)\%(Filename).h</HeaderFileOutput>
<ObjectFileOutput />
</None>
<None Include="Shaders\HighlightShared.hlsl" />
<FxCompile Include="Shaders\HighlightPixelShader.hlsl">
<ShaderType>Pixel</ShaderType>
<ShaderModel>5.0</ShaderModel>

Просмотреть файл

@ -10,6 +10,7 @@
#include <optional>
#include <string>
#include <chrono>
#include <mutex>
#include <DirectXMath.h>