OpenXR Key Concepts

OpenXR enables developers to build apps that are portable across headsets from almost all vendors. It defines an API that enable apps to communicate with the hardware and system software driving an XR device. This is done by making calls to a runtime which supports the OpenXR API.

The OpenXR specification and supporting materials are maintained by the Khronos Group.

The OpenXR runtime for the Xcelerate (CVR-655) is Snapdragon Spaces, which is maintained by Qualcomm. It supports OpenXR version 1.0.34.

Unless you're writing a native application against the OpenXR API, you won't need to refer to the specification directly. This is because frameworks and middleware (such as game engines) abstract the details. However, there are a few concepts you may need to be familiar with.

Runtimes

An OpenXR runtime is a software layer responsible for managing communication between applications and the XR hardware. While runtimes vary in implementation, all support the same API - OpenXR. Thus, an application built against the OpenXR API can - in theory - run on any runtime.

On standalone devices (such as the CVR-655) it is common for an OpenXR runtime to come pre-installed on the device.

Loaders

An OpenXR loader is a library responsible for discovering OpenXR runtimes and API layers on a system.

On Android, libopenxr_loader.so is dynamically linked and bundled with an application within the APK.

Khronos

The Khronos group provides a loader implementation which is compatible with the CVR-655 and most other headsets. If you're using a framework or middleware, the Khronos loader is usually the default.

Snapdragon Spaces

Use of the Snapdragon Spaces loader is not recommended

Qualcomm also provide a loader implementation specifically for the Snapdragon Spaces runtime. This is approaching end-of-life and so is not recommended.

Extensions

OpenXR extensions add to the API to expose additional functionality. There are three categories:

  • Khronos extensions - prefixed with XR_KHR_, these are widely available and supported by all runtimes

  • Multi-vendor extensions - prefixed with XR_EXT_, these are supported by multiple runtimes

  • Vendor-specific extensions - prefixed with the vendor name in some form, these are specific to certain runtimes

Reference Spaces

An OpenXR reference space is a coordinate system used for tracking position and orientation relative to a frame of reference.

The CVR-655 supports four reference spaces:

  • XR_REFERENCE_SPACE_TYPE_VIEW

  • XR_REFERENCE_SPACE_TYPE_LOCAL

  • XR_REFERENCE_SPACE_TYPE_STAGE

  • XR_REFERENCE_SPACE_TYPE_UNBOUNDED_MSFT

XR_REFERENCE_SPACE_TYPE_STAGE is recommended for most 6DoF apps, as this will place the origin at the floor height specified when the user sets a boundary.

Unity

The XR Origin component controls the reference space, via the TrackingOriginMode enum. The options available are:

  • Not Specified

  • Device

  • Floor

  • Unbounded (added in Unity 6.1)

"Not Specified" is the default value, and uses the default tracking origin mode of the headset which is XR_REFERENCE_SPACE_TYPE_STAGE (recommended). "Floor" will also use this reference space.

Last updated