I am working on Windows 10 with Windows Mixed Reality Runtime and Hololens 2 emulator to run the hello_xr test . I was able to build the project using Visual Studio 19 and run it from command prompt as follows
According to the spec, XR_ERROR_FORM_FACTOR_UNAVAILABLE means that the hardware is temporarily unavailable. It may mean something like a headset not connected or turned off. Since you are running an emulator, the thing to check would be that the emulator is being seen by the runtime.
I will try to run the hello_xr project from within Visual studio with Hololens 2 emulator as the debug target. This may not be easy to do since hello_xr code must be converted / moved to Universal Windows Platform (UWP) project. [https://learn.microsoft.com/en-us/cpp/porting/porting-to-the-universal-windows-platform-cpp?view=msvc-170]
As a side note, I just want to run the hello_xr sample on windows but don’t have access to VR hardware, is Hololens 2 emulator my only option? I am interested in running it with head mounted display form factor and stereo view configuration type.
Thanks! I was able to run it using SteamVR and an android phone.
Just in case someone stumbles upon this. Steps I followed are
Install SteamVR. This link [https://sites.google.com/view/brown-vr-sw-review-2018/vr-hardware/hardware-emulators/ivry-tutorial?pli=1] goes into all the details.
Change the active runtime from Windows Mixed Reality to SteamVR. This link [https://steamcommunity.com/app/250820/discussions/8/2448217320134491995/] provides the path to the manifest json file for SteamVR. Registry editor can be updated to change the active runtime, details for this can be found here [https://registry.khronos.org/OpenXR/specs/1.0/loader.html#runtime-discovery].