This repository contains a C++ prototype demonstrating interoperability between WebGPU (via wgpu_native) and OpenXR.
The goal of this project is to provide a modern, cross-platform, and explicit graphics stack for Virtual Reality
applications, replacing legacy OpenGL and OpenVR workflows.
src/main/: The core thesis prototype. An interoperability layer bridging WebGPU rendering with the OpenXR swapchain.src/webgpu/: A standalone WebGPU application to test graphics and windowing without VR overhead.src/openxr/: A standalone OpenXR application to verify headset detection and runtime configuration without graphics overhead.src/external/: Vendored dependencies (included in the repo for easy building).test/: MSVC Demo.
Most dependencies are vendored in the src/external/ directory, meaning that you do not need to install them system-wide.
The vendored libraries include:
- wgpu_native (WebGPU implementation)
- OpenXR-SDK (VR Runtime Loader)
- GLFW (Windowing, not needed for VR)
- GLM (Mathematics)
Warning
The project also needs the compiled libraries from the custom fork of wgpu-native
The final compiled library is included but make sure it is there.
- CMake (
v3.20or higher) - C++20 compatible compiler (GCC, Clang, MSVC)
- An active OpenXR Runtime installed on your system (e.g. SteamVR, Meta Quest Link, Monado)
- Linux only: Wayland/x11 development headers
This project uses standard CMake out-of-source builds. Open your terminal in the root directory of the project and run:
# Create a build
cmake -B build -S .
# Compile executables
cmake --build buildAfter a successful build, the executables will be located in the src/build
# Test WebGPU (Monitor Only)
cd src/build/webgpu && ./demo_webgpu
# Test OpenXR
cd src/build/openxr && ./demo_openxr
# Test Main
cd src/build/main && ./demo_mainThe final demo, the deliverable of the project, can be found in the test folder. Here the project is built using Visual Studio 2026, using MSVC and managing dependencies and build in a different way.
If you whish to use the final demo through windows and this build system, just double click on the .slnx file and
follow the IDE's instructions (ideally usable with Visual Studio 2022 and later)
This project is developed for SUPSI and therefore licensed to the istitution. You can also take inspiration or use it as a tutorial under my name with a MIT License.