Closed davilovick closed 2 years ago
Yes, Windows Mixed Reality on the desktop supports both UWP and Win32 applications, but on HoloLens 2 the application must be UWP.
Thanks @brycehutchings
One thing that can help here is the OpenXR runtime will handle all of the things normally required in UWP app (FrameworkView, AppView, CoreWindow, etc), so if you write a pure OpenXR app with a simple WinMain entry point, just like a Win32 app, it will work when packaged as UWP. See our sample https://github.com/microsoft/OpenXR-MixedReality/blob/main/samples/BasicXrApp/App.cpp which does this. So the app still must be packaged as UWP and run in an app container, but the code can look like a traditional Win32 app.
Right now we are developing Evergine, a C# graphic engine, and for HoloLens application development, we are using right now UWP C# project templates (using OpenXR right now :) ) Our main concern is the lack of NET6 support in UWP applications, so we are trying to explore new ways to deploy in HoloLens, because the majority of NET libraries and utilities are migrating to NET6.
Thanks again @brycehutchings
We had a little bit of this same discussion on the StereoKit discord channel this morning, too. The state of UWP, Hololens, .NET 6, MAUI, and the entire future direction of Hololens app support is a bit confusing.
The virtual monitor preallocation that has to be enabled during Win32 app usage does make the whole runtime pretty unstable, I would recommend making a UWP app if possible, because you might run into some annoyances. You can disable the preallocation with the "classic apps" setting in startup & desktop in the mixed reality settings
Is it possible to deploy and run win32 applications in HoloLens2 devices (or HoloLens2 Emulator).
Reading the MixedReality documentation indicates that it is supported both UWP and Win32 applications using OpenXR for creating Inmersive experiences, but I'm not sure if Win32 is only for Desktop experiences.
Best regards, David Ávila