OpenXR Source test: hello_xr - OpenGL VS D3D12

When trying hello_xr -g OpenGL versus hello_xr -g D3D12 or D3D11, I notice huge difference in quality. Direct X runs much better. Why is this? Is Direct X so much better for VR, or is the OpenGL code not as well written or something?

The Hello XR code is pretty primitive, not optimized at all. I wouldn’t expect a big quality difference, but I don’t use WIndows very often recently. OpenGL should be fine for VR applications, if you want more low-level control Vulkan or d3d12 can be considered.

Do you know where I can find more examples? I would love to see some explanatary code and tutorials.

1 Like

there’s a Linux OpenGL sample at Monado / Demos / openxr-simple-example · GitLab and linux Vulkan at Monado / Demos / xrgears · GitLab

There’s a theoretically-cross-platform-but-right-now-Linux OpenGL sample Monado / Demos / OpenGLHighPolyTest · GitLab

Microsoft has put out their own sample app as well: Getting started with OpenXR - Mixed Reality | Microsoft Docs

Note that all of these are written primarily for demonstration/education purposes (or in the case of “high poly”, it’s very useful for runtime developers like me testing compositor changes). For performance-optimized code, most folks use engines to do that part for them. There is the Godot engine that is open-source and has OpenXR support, increasing in quality and performance regularly, etc.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.