Current state: The branch should compile with necessary files and libraries from the OpenXR SDK. With that, Blender can dynamically select and link to the operating system’s active OpenXR runtime.
So for example if you have the Windows Mixed Reality OpenXR Developer Preview installed and set up, Blender can connect to it to interface with Windows Mixed Reality compatible HMDs.
From the Blender code side, we can do OpenXR function calls now (e.g.
xrCreateInstance). The code also already attempts to initialize OpenXR.
So there’s nothing really interesting to see for users yet, basically we should be set up to use OpenXR now.
Note that nothing has been tested on MacOS yet.
I could need some feedback from platform maintainers/project-admins:
For OpenXR we need some headers (most importantly
openxr.h), and need to link to the SDK’s OpenXR-loader lib. For convenience I added needed sources to
extern\, so that people compiling the branch don’t need to compile the SDK themselves.
I guess for a later merge, having the lib as 3rd party dependency makes more sense, so I’ve also added a
find_package() variant. To use this
OPENXR_USE_BUNDLED_SRC can be disabled. Later we can remove the bundled sources version.
Do maintainers/admins agree that this approach is fine for now? Obviously we may want to re-evaluate later on.
CCing @ideasman42, @sergey and @brecht for feedback on this.