Base on https://github.com/microsoft/OpenXR-MixedReality
This example require an Hololens 2 device or the emulator
To deploy on Hololens 2 device you need to target arm64_uwp
mkdir build/arm64_uwp
cd build/arm64_uwp
cmake ../.. -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 -A arm64
For the emulator target x64_uwp
mkdir build/x64_uwp
cd build/x64_uwp
cmake ../.. -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0
To render with BGFX you need a modified version available in the proto-hololens branch in the https://github.com/VirtualGeo/bgfx repository
git clone --recurse-submodules https://github.com/VirtualGeo/bgfx.cmake
cd bgfx.cmake/bgfx
git checkout proto-hololens
Back to the bgfx.cmake directory and generate solution.
To deploy on the hololens device :
mkdir build/arm64_uwp
cd build/arm64_uwp
cmake ../.. -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 -DBGFX_BUILD_EXAMPLES=OFF -DBGFX_BUILD_TOOLS=OFF -DCMAKE_INSTALL_PREFIX=../../bgfx-install/arm64_uwp -A arm64
cmake --build .
cmake --install ../../bgfx-install/arm64_uwp
To deploy on the hololens emulator :
mkdir build/x64_uwp
cd build/x64_uwp
cmake ../.. -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 -DBGFX_BUILD_EXAMPLES=OFF -DBGFX_BUILD_TOOLS=OFF -DCMAKE_INSTALL_PREFIX=../../bgfx-install/x64_uwp
cmake --build .
cmake --install ../../bgfx-install/x64_uwp