├── .clang-format
├── .gitattributes
├── .gitignore
├── BasicXrApp.sln
├── Directory.Build.props
├── Directory.Build.targets
├── LICENSE
├── NOTICE
├── README.md
├── SECURITY.md
├── Samples.sln
├── WinXR.wprp
├── azure-pipelines.yml
├── openxr_preview
└── include
│ ├── openxr
│ ├── openxr.h
│ ├── openxr_platform.h
│ ├── openxr_platform_defines.h
│ ├── openxr_reflection.h
│ ├── openxr_reflection_parent_structs.h
│ └── openxr_reflection_structs.h
│ └── openxr_preview
│ └── openxr_msft_preview.h
├── samples
├── BasicXrApp
│ ├── App.cpp
│ ├── Assets
│ │ ├── LockScreenLogo.scale-200.png
│ │ ├── SplashScreen.scale-200.png
│ │ ├── Square150x150Logo.scale-200.png
│ │ ├── Square44x44Logo.scale-200.png
│ │ ├── Square44x44Logo.targetsize-24_altform-unplated.png
│ │ ├── StoreLogo.png
│ │ └── Wide310x150Logo.scale-200.png
│ ├── BasicXrApp_uwp.vcxproj
│ ├── BasicXrApp_uwp.vcxproj.filters
│ ├── BasicXrApp_win32.vcxproj
│ ├── CubeGraphics.cpp
│ ├── DxUtility.cpp
│ ├── DxUtility.h
│ ├── OpenXrProgram.cpp
│ ├── OpenXrProgram.h
│ ├── Package.appxmanifest
│ ├── TemporaryKey.pfx
│ ├── packages.config
│ ├── pch.cpp
│ └── pch.h
├── EyeGazeInteractionUwp
│ ├── EyeGazeInteractionUwp.vcxproj
│ ├── EyeGazeInteractionUwp.vcxproj.filters
│ ├── Main.cpp
│ ├── Package.appxmanifest
│ ├── Scene_EyeGazeInteraction.cpp
│ ├── TemporaryKey.pfx
│ ├── packages.config
│ ├── pch.cpp
│ └── pch.h
├── SampleSceneUwp
│ ├── Main.cpp
│ ├── Package.appxmanifest
│ ├── SampleSceneUwp.vcxproj
│ ├── SampleSceneUwp.vcxproj.filters
│ ├── Scene_HandTracking.cpp
│ ├── Scene_Orbit.cpp
│ ├── TemporaryKey.pfx
│ ├── packages.config
│ ├── pch.cpp
│ └── pch.h
├── SampleSceneWin32
│ ├── Key.glb
│ ├── Main.cpp
│ ├── Main.ico
│ ├── Main.rc
│ ├── Resource.h
│ ├── SampleSceneWin32.vcxproj
│ ├── SampleSceneWin32.vcxproj.filters
│ ├── Scene_ControllerActions.cpp
│ ├── Scene_ControllerModel.cpp
│ ├── Scene_TrackingState.cpp
│ ├── packages.config
│ ├── pch.cpp
│ ├── pch.h
│ └── small.ico
├── SceneUnderstandingUwp
│ ├── Main.cpp
│ ├── Package.appxmanifest
│ ├── SceneUnderstandingUwp.vcxproj
│ ├── SceneUnderstandingUwp.vcxproj.filters
│ ├── Scene_Placement.cpp
│ ├── Scene_QRCode.cpp
│ ├── TemporaryKey.pfx
│ ├── packages.config
│ ├── pch.cpp
│ └── pch.h
└── ThreeSpacesUwp
│ ├── Main.cpp
│ ├── Package.appxmanifest
│ ├── Scene_ThreeSpaces.cpp
│ ├── TemporaryKey.pfx
│ ├── ThreeSpacesUwp.vcxproj
│ ├── ThreeSpacesUwp.vcxproj.filters
│ ├── packages.config
│ ├── pch.cpp
│ └── pch.h
└── shared
├── SampleShared
├── DirectXTK
│ ├── DDSTextureLoader.cpp
│ ├── DDSTextureLoader.h
│ ├── DirectXHelpers.h
│ ├── LoaderHelpers.h
│ ├── PlatformHelpers.h
│ └── dds.h
├── DxUtility.cpp
├── DxUtility.h
├── FileUtility.cpp
├── FileUtility.h
├── SampleShared_uwp.vcxproj
├── SampleShared_uwp.vcxproj.filters
├── SampleShared_win32.vcxproj
├── SampleShared_win32.vcxproj.filters
├── ScopeGuard.h
├── TextureUtility.cpp
├── TextureUtility.h
├── ThreadPool.h
├── Trace.h
├── UWPAssets
│ ├── smallTile-sdk.png
│ ├── splash-sdk.png
│ ├── squareTile-sdk.png
│ └── storeLogo-sdk.png
├── XrActionContext.h
├── XrInstanceContext.h
├── XrSessionContext.h
├── XrSystemContext.h
├── packages.config
├── pch.cpp
├── pch.h
├── sample_DiffuseHDR.dds
└── sample_SpecularHDR.dds
├── XrSceneLib
├── CompositionLayers.h
├── Context.h
├── ControllerObject.cpp
├── ControllerObject.h
├── FrameTime.h
├── Object.cpp
├── Object.h
├── ObjectMotion.cpp
├── ObjectMotion.h
├── PbrModelObject.cpp
├── PbrModelObject.h
├── ProjectionLayer.cpp
├── ProjectionLayer.h
├── QuadLayerObject.cpp
├── QuadLayerObject.h
├── Scene.cpp
├── Scene.h
├── Scene_Title.cpp
├── SpaceObject.cpp
├── SpaceObject.h
├── TextTexture.cpp
├── TextTexture.h
├── XrApp.cpp
├── XrApp.h
├── XrSceneLib_uwp.vcxproj
├── XrSceneLib_uwp.vcxproj.filters
├── XrSceneLib_win32.vcxproj
├── XrSceneLib_win32.vcxproj.filters
├── packages.config
├── pch.cpp
└── pch.h
├── XrUtility
├── XrDispatchTable.h
├── XrEnabledExtensions.h
├── XrEnumerate.h
├── XrError.h
├── XrExtensionDefined.h
├── XrGuid.h
├── XrHandle.h
├── XrListFunctions.h
├── XrMath.h
├── XrPlatformDependencies.h
├── XrSceneUnderstanding.h
├── XrSceneUnderstanding.hpp
├── XrSceneUnderstandingSerialization.hpp
├── XrSide.h
├── XrSpatialGraphBridge.h
├── XrStereoView.h
├── XrString.h
├── XrStruct.h
├── XrStructTraits.h
├── XrToString.h
├── XrUuid.h
└── XrViewConfiguration.h
├── ext
├── DirectXMath
│ ├── .gitignore
│ ├── .nuget
│ │ ├── directxmath.nuspec
│ │ ├── directxmath.targets
│ │ └── signconfig.xml
│ ├── Extensions
│ │ ├── DirectXMathAVX.h
│ │ ├── DirectXMathAVX2.h
│ │ ├── DirectXMathBE.h
│ │ ├── DirectXMathF16C.h
│ │ ├── DirectXMathFMA3.h
│ │ ├── DirectXMathFMA4.h
│ │ ├── DirectXMathSSE3.h
│ │ └── DirectXMathSSE4.h
│ ├── HISTORY.md
│ ├── Inc
│ │ ├── DirectXCollision.h
│ │ ├── DirectXCollision.inl
│ │ ├── DirectXColors.h
│ │ ├── DirectXMath.h
│ │ ├── DirectXMathConvert.inl
│ │ ├── DirectXMathMatrix.inl
│ │ ├── DirectXMathMisc.inl
│ │ ├── DirectXMathVector.inl
│ │ ├── DirectXPackedVector.h
│ │ └── DirectXPackedVector.inl
│ ├── LICENSE
│ ├── README.md
│ ├── SHMath
│ │ ├── DirectXSH.cpp
│ │ ├── DirectXSH.h
│ │ ├── DirectXSHD3D11.cpp
│ │ └── DirectXSHD3D12.cpp
│ ├── Stereo3D
│ │ ├── Stereo3DMatrixHelper.cpp
│ │ └── Stereo3DMatrixHelper.h
│ └── XDSP
│ │ └── XDSP.h
├── d3dx12.h
├── fmt
│ ├── args.h
│ ├── chrono.h
│ ├── color.h
│ ├── compile.h
│ ├── core.h
│ ├── format-inl.h
│ ├── format.h
│ ├── locale.h
│ ├── os.h
│ ├── ostream.h
│ ├── printf.h
│ ├── ranges.h
│ └── xchar.h
├── mikktspace.cpp
├── mikktspace.h
├── rapidjson
│ ├── allocators.h
│ ├── cursorstreamwrapper.h
│ ├── document.h
│ ├── encodedstream.h
│ ├── encodings.h
│ ├── error
│ │ ├── en.h
│ │ └── error.h
│ ├── filereadstream.h
│ ├── filewritestream.h
│ ├── fwd.h
│ ├── internal
│ │ ├── biginteger.h
│ │ ├── clzll.h
│ │ ├── diyfp.h
│ │ ├── dtoa.h
│ │ ├── ieee754.h
│ │ ├── itoa.h
│ │ ├── meta.h
│ │ ├── pow10.h
│ │ ├── regex.h
│ │ ├── stack.h
│ │ ├── strfunc.h
│ │ ├── strtod.h
│ │ └── swap.h
│ ├── istreamwrapper.h
│ ├── memorybuffer.h
│ ├── memorystream.h
│ ├── msinttypes
│ │ ├── inttypes.h
│ │ └── stdint.h
│ ├── ostreamwrapper.h
│ ├── pointer.h
│ ├── prettywriter.h
│ ├── rapidjson.h
│ ├── reader.h
│ ├── schema.h
│ ├── stream.h
│ ├── stringbuffer.h
│ └── writer.h
├── stb_image.h
├── stb_image_write.h
└── tiny_gltf.h
├── gltf
├── ExternalImpl.cpp
├── GltfHelper.cpp
├── GltfHelper.h
├── Gltf_uwp.vcxproj
├── Gltf_uwp.vcxproj.filters
├── Gltf_win32.vcxproj
├── Gltf_win32.vcxproj.filters
├── pch.cpp
└── pch.h
└── pbr
├── GltfLoader.cpp
├── GltfLoader.h
├── PbrCommon.cpp
├── PbrCommon.h
├── PbrMaterial.cpp
├── PbrMaterial.h
├── PbrModel.cpp
├── PbrModel.h
├── PbrPrimitive.cpp
├── PbrPrimitive.h
├── PbrResources.cpp
├── PbrResources.h
├── Shaders
├── HighlightPixelShader.hlsl
├── HighlightShared.hlsl
├── HighlightVertexShader.hlsl
├── PbrPixelShader.hlsl
├── PbrShared.hlsl
├── PbrVertexShader.hlsl
└── Shared.hlsl
├── brdf_lut.png
├── pbr_uwp.vcxproj
├── pbr_uwp.vcxproj.filters
├── pbr_win32.vcxproj
├── pbr_win32.vcxproj.filters
├── pch.cpp
└── pch.h
/.clang-format:
--------------------------------------------------------------------------------
1 | ---
2 | # Created at https://zed0.co.uk/clang-format-configurator/
3 | AllowShortBlocksOnASingleLine: 'false'
4 | AllowShortFunctionsOnASingleLine: 'false'
5 | AccessModifierOffset: '-4'
6 | AlignEscapedNewlines: 'Left'
7 | AlwaysBreakTemplateDeclarations: 'true'
8 | BinPackParameters: false
9 | BinPackArguments: false
10 | BreakBeforeBraces: Custom
11 | BreakConstructorInitializers: 'BeforeComma'
12 | ColumnLimit: '140'
13 | ConstructorInitializerAllOnOneLineOrOnePerLine: 'false'
14 | IndentCaseLabels: 'false'
15 | IndentWidth: '4'
16 | IndentWrappedFunctionNames: 'false'
17 | ForEachMacros: ['TEST_CLASS']
18 | KeepEmptyLinesAtTheStartOfBlocks: 'false'
19 | MaxEmptyLinesToKeep: '1'
20 | NamespaceIndentation: All
21 | PenaltyReturnTypeOnItsOwnLine: 100
22 | PointerAlignment: Left
23 | SortIncludes: 'false'
24 | SpaceAfterCStyleCast: 'false'
25 | SpaceBeforeAssignmentOperators: 'true'
26 | SpaceBeforeParens: ControlStatements
27 | SpaceInEmptyParentheses: 'false'
28 | SpacesInAngles: 'false'
29 | SpacesInCStyleCastParentheses: 'false'
30 | SpacesInContainerLiterals: 'false'
31 | SpacesInParentheses: 'false'
32 | SpacesInSquareBrackets: 'false'
33 | Standard: Cpp11
34 | UseTab: Never
35 |
36 | ...
37 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto
2 | *.cpp text
3 | *.h text
4 | *.inl text
5 | *.vcproj text
6 | *.vcxproj text
7 | *.sln text
8 | *.props text
9 | *.targets text
10 | *.bat text eol=crlf
11 | *.cmd text eol=crlf
12 | *.sh text eol=lf
13 | *.html text eol=lf
14 | *.adoc text eol=lf
15 |
--------------------------------------------------------------------------------
/Directory.Build.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 | $(SolutionDir)bin\$(Configuration)\$(Platform)\
9 | $(SolutionDir)obj\$(Configuration)\$(Platform)\$(MSBuildProjectName)\
10 | $(SolutionDir)obj\$(Configuration)\$(Platform)\$(MSBuildProjectName)\GeneratedFiles
11 |
12 | $(MSBuildThisFileDirectory)shared
13 | $(MSBuildThisFileDirectory)openxr_preview
14 |
15 |
16 |
17 | true
18 | true
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Directory.Build.targets:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | $(OpenXrSdkPath)\include;$(SharedPath);$(SharedPath)\ext;$(IntDir);%(AdditionalIncludeDirectories);
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) Microsoft Corporation.
2 |
3 | MIT License
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/SECURITY.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | ## Security
4 |
5 | Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
6 |
7 | If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below.
8 |
9 | ## Reporting Security Issues
10 |
11 | **Please do not report security vulnerabilities through public GitHub issues.**
12 |
13 | Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report).
14 |
15 | If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey).
16 |
17 | You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc).
18 |
19 | Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
20 |
21 | * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
22 | * Full paths of source file(s) related to the manifestation of the issue
23 | * The location of the affected source code (tag/branch/commit or direct URL)
24 | * Any special configuration required to reproduce the issue
25 | * Step-by-step instructions to reproduce the issue
26 | * Proof-of-concept or exploit code (if possible)
27 | * Impact of the issue, including how an attacker might exploit the issue
28 |
29 | This information will help us triage your report more quickly.
30 |
31 | If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs.
32 |
33 | ## Preferred Languages
34 |
35 | We prefer all communications to be in English.
36 |
37 | ## Policy
38 |
39 | Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd).
40 |
41 |
42 |
--------------------------------------------------------------------------------
/azure-pipelines.yml:
--------------------------------------------------------------------------------
1 | # Universal Windows Platform
2 | # Build a Universal Windows Platform project using Visual Studio.
3 | # Add steps that test and distribute an app, save build artifacts, and more:
4 | # https://aka.ms/yaml
5 |
6 | trigger:
7 | - main
8 |
9 | pr:
10 | - main
11 |
12 | pool:
13 | vmImage: "windows-latest"
14 |
15 | stages:
16 | - stage: Build
17 | jobs:
18 | - job: Build
19 | timeoutInMinutes: 30
20 | strategy:
21 | maxParallel: 8
22 | matrix:
23 | Debug x86:
24 | BuildConfiguration: Debug
25 | BuildPlatform: x86
26 | Debug x64:
27 | BuildConfiguration: Debug
28 | BuildPlatform: x64
29 | Debug ARM:
30 | BuildConfiguration: Debug
31 | BuildPlatform: ARM
32 | Debug ARM64:
33 | BuildConfiguration: Debug
34 | BuildPlatform: ARM64
35 | Release x86:
36 | BuildConfiguration: Release
37 | BuildPlatform: x86
38 | Release x64:
39 | BuildConfiguration: Release
40 | BuildPlatform: x64
41 | Release ARM:
42 | BuildConfiguration: Release
43 | BuildPlatform: ARM
44 | Release ARM64:
45 | BuildConfiguration: Release
46 | BuildPlatform: ARM64
47 | steps:
48 | - checkout: self
49 | clean: true
50 | lfs: true
51 |
52 | - task: NuGetInstaller@0
53 | displayName: "NuGet Restore"
54 | inputs:
55 | solution: BasicXrApp.sln
56 | verbosity: Detailed
57 |
58 | - task: NuGetInstaller@0
59 | displayName: "NuGet Restore"
60 | inputs:
61 | solution: Samples.sln
62 | verbosity: Detailed
63 |
64 | - task: VSBuild@1
65 | displayName: "Build Samples.sln"
66 | inputs:
67 | solution: Samples.sln
68 | vsVersion: "16.0"
69 | msbuildArgs: '/fl /flp:LogFile=$(System.DefaultWorkingDirectory)\bin\Logs\MsBuild_$(BuildConfiguration)_$(BuildPlatform).log;Verbosity=diagnostic'
70 | platform: $(BuildPlatform)
71 | configuration: $(BuildConfiguration)
72 | maximumCpuCount: true
73 |
74 | - task: VSBuild@1
75 | displayName: "Build BasicXrApp.sln"
76 | inputs:
77 | solution: "BasicXrApp.sln"
78 | vsVersion: "16.0"
79 | msbuildArgs: '/fl /flp:LogFile=$(System.DefaultWorkingDirectory)\bin\Logs\MsBuild_$(BuildConfiguration)_$(BuildPlatform).log;Verbosity=diagnostic'
80 | platform: "$(BuildPlatform)"
81 | configuration: "$(BuildConfiguration)"
82 | maximumCpuCount: true
83 |
--------------------------------------------------------------------------------
/openxr_preview/include/openxr_preview/openxr_msft_preview.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | ////////////////////////////////////////////////////////////////////////////////
4 | // Copyright (C) Microsoft Corporation. All Rights Reserved
5 |
6 | // clang-format off
7 |
8 | // Supports XrStructTraits and ValidateStruct
9 | #define XR_LIST_STRUCTURE_TYPES_MSFT_PREVIEW(_)
10 |
11 | // Supports IXrExtensionConfiguration.EnabledExtensions()
12 | #define XR_LIST_EXTENSIONS_MSFT_PREVIEW(_)
13 |
14 | // Supports xrStructureTypeToString and IsKnownStructType
15 | #define XR_LIST_ENUM_XrStructureType_MSFT_PREVIEW(_)
16 |
17 | // Supports XrDispatchTable.h
18 | #define XR_LIST_FUNCTIONS_MSFT_PREVIEW(_)
19 |
20 | // clang-format on
21 |
--------------------------------------------------------------------------------
/samples/BasicXrApp/App.cpp:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation.
2 | // Licensed under the MIT License.
3 |
4 |
5 | #include "pch.h"
6 | #include "OpenXrProgram.h"
7 |
8 | #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
9 | constexpr const char* ProgramName = "BasicXrApp_win32";
10 | #else
11 | constexpr const char* ProgramName = "BasicXrApp_uwp";
12 | #endif
13 |
14 | int __stdcall wWinMain(_In_ HINSTANCE, _In_opt_ HINSTANCE, _In_ LPWSTR, _In_ int) {
15 | try {
16 | auto graphics = sample::CreateCubeGraphics();
17 | auto program = sample::CreateOpenXrProgram(ProgramName, std::move(graphics));
18 | program->Run();
19 | } catch (const std::exception& ex) {
20 | DEBUG_PRINT("Unhandled Exception: %s\n", ex.what());
21 | return 1;
22 | } catch (...) {
23 | DEBUG_PRINT("Unhandled Exception\n");
24 | return 1;
25 | }
26 | return 0;
27 | }
28 |
--------------------------------------------------------------------------------
/samples/BasicXrApp/Assets/LockScreenLogo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/OpenXR-MixedReality/65f472305206d24846701a7496befb0c104e6cb2/samples/BasicXrApp/Assets/LockScreenLogo.scale-200.png
--------------------------------------------------------------------------------
/samples/BasicXrApp/Assets/SplashScreen.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/OpenXR-MixedReality/65f472305206d24846701a7496befb0c104e6cb2/samples/BasicXrApp/Assets/SplashScreen.scale-200.png
--------------------------------------------------------------------------------
/samples/BasicXrApp/Assets/Square150x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/OpenXR-MixedReality/65f472305206d24846701a7496befb0c104e6cb2/samples/BasicXrApp/Assets/Square150x150Logo.scale-200.png
--------------------------------------------------------------------------------
/samples/BasicXrApp/Assets/Square44x44Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/OpenXR-MixedReality/65f472305206d24846701a7496befb0c104e6cb2/samples/BasicXrApp/Assets/Square44x44Logo.scale-200.png
--------------------------------------------------------------------------------
/samples/BasicXrApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/OpenXR-MixedReality/65f472305206d24846701a7496befb0c104e6cb2/samples/BasicXrApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
--------------------------------------------------------------------------------
/samples/BasicXrApp/Assets/StoreLogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/OpenXR-MixedReality/65f472305206d24846701a7496befb0c104e6cb2/samples/BasicXrApp/Assets/StoreLogo.png
--------------------------------------------------------------------------------
/samples/BasicXrApp/Assets/Wide310x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/OpenXR-MixedReality/65f472305206d24846701a7496befb0c104e6cb2/samples/BasicXrApp/Assets/Wide310x150Logo.scale-200.png
--------------------------------------------------------------------------------
/samples/BasicXrApp/BasicXrApp_uwp.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | Assets
18 |
19 |
20 | Assets
21 |
22 |
23 | Assets
24 |
25 |
26 | Assets
27 |
28 |
29 | Assets
30 |
31 |
32 | Assets
33 |
34 |
35 | Assets
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 | {ba51acbc-acf1-43fd-bb49-7c52d6095d7a}
44 |
45 |
46 |
47 |
48 | Assets
49 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/samples/BasicXrApp/DxUtility.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation.
2 | // Licensed under the MIT License.
3 |
4 | #pragma once
5 |
6 | #include //ID3DBlob
7 |
8 | namespace sample::dx {
9 |
10 | winrt::com_ptr GetAdapter(LUID adapterId);
11 |
12 | void CreateD3D11DeviceAndContext(IDXGIAdapter1* adapter,
13 | const std::vector& featureLevels,
14 | ID3D11Device** device,
15 | ID3D11DeviceContext** deviceContext);
16 |
17 | winrt::com_ptr CompileShader(const char* hlsl, const char* entrypoint, const char* shaderTarget);
18 | } // namespace sample::dx
19 |
--------------------------------------------------------------------------------
/samples/BasicXrApp/OpenXrProgram.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation.
2 | // Licensed under the MIT License.
3 |
4 | #pragma once
5 |
6 | namespace sample {
7 | struct Cube {
8 | xr::SpaceHandle Space{};
9 | std::optional PoseInSpace{}; // Relative pose in cube Space. Default to identity.
10 | XrVector3f Scale{0.1f, 0.1f, 0.1f};
11 |
12 | XrPosef PoseInAppSpace = xr::math::Pose::Identity(); // Cube pose in app space that gets updated every frame
13 | };
14 |
15 | struct IOpenXrProgram {
16 | virtual ~IOpenXrProgram() = default;
17 | virtual void Run() = 0;
18 | };
19 |
20 | struct IGraphicsPluginD3D11 {
21 | virtual ~IGraphicsPluginD3D11() = default;
22 |
23 | // Create an instance of this graphics api for the provided instance and systemId.
24 | virtual ID3D11Device* InitializeDevice(LUID adapterLuid, const std::vector& featureLevels) = 0;
25 |
26 | // List of color pixel formats supported by this app.
27 | virtual const std::vector& SupportedColorFormats() const = 0;
28 | virtual const std::vector& SupportedDepthFormats() const = 0;
29 |
30 | // Render to swapchain images using stereo image array
31 | virtual void RenderView(const XrRect2Di& imageRect,
32 | const float renderTargetClearColor[4],
33 | const std::vector& viewProjections,
34 | DXGI_FORMAT colorSwapchainFormat,
35 | ID3D11Texture2D* colorTexture,
36 | DXGI_FORMAT depthSwapchainFormat,
37 | ID3D11Texture2D* depthTexture,
38 | const std::vector& cubes) = 0;
39 | };
40 |
41 | std::unique_ptr CreateCubeGraphics();
42 | std::unique_ptr CreateOpenXrProgram(std::string applicationName, std::unique_ptr graphicsPlugin);
43 |
44 | } // namespace sample
45 |
--------------------------------------------------------------------------------
/samples/BasicXrApp/Package.appxmanifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
13 |
14 |
15 |
16 |
17 | BasicXrApp
18 | Microsoft Corporation
19 | Assets\StoreLogo.png
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
34 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/samples/BasicXrApp/TemporaryKey.pfx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/OpenXR-MixedReality/65f472305206d24846701a7496befb0c104e6cb2/samples/BasicXrApp/TemporaryKey.pfx
--------------------------------------------------------------------------------
/samples/BasicXrApp/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/samples/BasicXrApp/pch.cpp:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation.
2 | // Licensed under the MIT License.
3 |
4 | #include "pch.h"
5 |
--------------------------------------------------------------------------------
/samples/BasicXrApp/pch.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation.
2 | // Licensed under the MIT License.
3 |
4 | #pragma once
5 |
6 | #include
7 | #include
8 | #include
9 | #include
10 | #include
11 | #include
12 | #include
13 | #include