
My implementation doesn't yet use the VR controllers, but everything is available to add them. Of course Irrlicht doesn't provide 3d VR menus and other features, so the details of user interaction need implementing directly.
I didn't have to modify the Irrlicht source at all, as an outline, you start up as normal, using OpenGL, then pass the OpenGL context information to OpenXR, which generates textures in a swapchain, and in the main loop we get 'pose' information, set the camera position and direction based on these, render to these textures, and submit them back to OpenXR.
Most of the OpenXR runtimes seem to support OpenGL directly (I've tested tested with the Oculus Rift CV1 using the Oculus runtime, I think the Vive runtime supports OpenGl as well, although I don't have one to test it). Windows Moxed Reality only supports DirectX 12, but there's a little tool from https://github.com/mbucchia/OpenXR-Vk-D3D12 which acts as in interface layer and adds OpenGL support (requires a 64-bit build).
The VR part of my code is mostly below, called from main.cpp in the same folder. It's definitely not finished and tidy, but it works, which I'm really pleased with:
https://github.com/bridgecommand/bc/blo ... erface.cpp
It's very closely based on the example code in https://gitlab.freedesktop.org/monado/d ... e-example/