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).
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)
- GLM (Mathematics)
- 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_mainThis 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.