Skip to content

Latest commit

 

History

161 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Structure

  • 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.

Dependencies

Most dependencies are vendored in the src/external/ directory, meaning that you do not need to install them system-wide. The vendored libraries include:

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.

System Requirements to Build

  • CMake (v3.20 or 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

How to build

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 build

Usage

After 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_main

Test Demo

The 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)

License

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.

About

Feasibility study for WebGPU + OpenXR/OpenVR native use

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages