Skip to content

ox-runtime/ox

Repository files navigation

ox

ox is a new lightweight and cross-platform OpenXR runtime for Windows, Linux and Mac. It supports OpenGL, Vulkan and Metal.

The primary purpose of ox is automated testing of OpenXR applications using a virtual OpenXR device. It is useful during development and CI testing.

You can control the virtual device programmatically (e.g. press a button, move the headset, read screen texture etc), and integrate it with your existing test framework and code.

Warning

WORK-IN-PROGRESS - ox is still heavily under-development and is not (yet) fully compliant with the OpenXR spec.

Get Started

Click to use ox for:

  • Automated Testing - Use ox inside your application and testing framework. Useful for automated testing (including CI runners).
  • GUI - See the headset's view and control the devices visually in a GUI window. Useful for development and live testing.
  • REST API - Control the virtual device over HTTP. Useful for agentic development, or when you can't use the in-process API.

Using the Runtime

Set the XR_RUNTIME_JSON environment variable, or use the GUI to set ox as the default OpenXR runtime.

  • Windows: set XR_RUNTIME_JSON=C:\path\to\ox\ox_openxr.json
  • Linux/macOS: export XR_RUNTIME_JSON=/path/to/ox/ox_openxr.json

Then run any OpenXR application. Please open a new issue if you encounter any issues.

Development

Code

The code is organized into the following repositories:

  • ox (this repo): bundles the core sub-repos into a single build.
  • ox-sim-driver: the simulator GUI and C API (plus wrappers) for controlling the virtual device programmatically.
  • ox-runtime: the OpenXR runtime implementation.
  • ox-ipc-proxy: decouples the application process from the XR device, with an IPC proxy. Used by the GUI and REST API.

Build

  1. (Linux-only) Install platform dependencies:
# Ubuntu / Debian
sudo apt-get update
sudo apt-get install -y libgl1-mesa-dev libxcb-dev libx11-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libpng-dev pkg-config
  1. Configure and build:
cmake -B build
cmake --build build --config Release

The build will be produced in ./build/bin/.

Working with local checkouts

By default, the top-level CMake build fetches the sub-project repos with FetchContent. To work against local repo clones instead, pass any of these build-time flags:

  • OX_RUNTIME_REPO
  • OX_IPC_PROXY_REPO
  • OX_SIM_DRIVER_REPO

For e.g. to build against local clones of all three repos:

cmake -B build \
	-DOX_RUNTIME_REPO=/path/to/ox-runtime \
	-DOX_IPC_PROXY_REPO=/path/to/ox-ipc-proxy \
	-DOX_SIM_DRIVER_REPO=/path/to/ox-sim-driver
cmake --build build --target ox --config Release

Documentation

References

About

ox is a new lightweight and cross-platform OpenXR runtime for Windows, Linux and Mac. It's focused on automated testing of OpenXR apps.

Topics

Resources

License

Stars

Watchers

Forks

Packages