The hello_xr sample program from the OpenXR-SDK-Source repository includes frameworks and classes to handle building on multiple architectures (including Android) and on multiple rendering systems (OpenGL, GLES, Direct3D, Vulkan). This makes it really good for showing which parts of OpenXR are common and which are distinct across platforms.
I wanted a sample application that was aimed at a different target:
- OpenGL implementation (no GLES, so no Android needed).
- Starting application to build on, drawing things in world space.
- Builds separately from the SDK source code, linking against a system-installed OpenXR launcher.
I installed the Monado runtime on Ubuntu 20.04 and pared down the example program, resulting in an example that met my needs. I later verified its use in Windows with the HTC Vive. You can find it at https://github.com/ReliaSolve/OpenXR-OpenGL-Example.