Khronos OpenXR Registry

The OpenXR™ registry contains formatted specifications of the OpenXR API, header files, API reference pages, the reference card, and related documentation. The registry also links to the GitHub repository where the sources for these documents can be found.

For general information on OpenXR, including information on implementations, developer resources, and more, see the OpenXR homepage.

Index to the OpenXR Registry page content:

OpenXR 1.0 API Specifications

We currently publish the OpenXR API Specification in PDF and HTML forms. There are several versions of the OpenXR 1.0 Specification, as well as related Specifications and collateral material:

  • OpenXR 1.0 API + all published Extensions (Single-file HTML) (PDF)
    This Specification includes Khronos-defined KHR extensions such as the graphics API interfaces used on different platforms and window systems, as well as vendor-specific and multi-vendor EXT non-Khronos extensions.

OpenXR 1.0 Reference Card

The OpenXR 1.0 Reference Card (PDF) is a compact document summarizing the OpenXR 1.0 functions, structures, and enumerants, as well as providing an overview of the input system and a typical OpenXR application's flow.

API Reference Pages

The OpenXR API Reference Pages describe how to use individual API and extension commands. The goal is to define all commands and structures in the core API and extensions, although there may be some omissions in non-KHR extensions.

The reference pages are generated by automatic extraction from the Specification source, and are not separately checked into GitHub. The set of pages linked above are generated from the 1.0 API specification including all extensions.

OpenXR GitHub Repositories

API and Extension Specification Repository

The OpenXR-Docs repository contains the AsciiDoc source for the OpenXR API specification, and for registered OpenXR API extensions.

OpenXR-Docs also contains the generated header files, API Registry xr.xml, and scripts for spec building and verification.

Header Files

For most developers, the header files provided with the generated loader source in the OpenXR-SDK GitHub repository is all that's needed.

However, all OpenXR headers provided by Khronos are ultimately obtained from the OpenXR-Docs repository. If you need to generate a customized version of the headers and/or loader, use the API Registry xr.xml in OpenXR-SDK-Source or OpenXR-Docs as required, together with the scripts in specification/scripts and/or src/scripts.

API Registry

OpenXR defines an API Registry for the API and extensions, formally defining function prototypes, structures, enumerants, and many other aspects of the API and extension mechanisms. The OpenXR Registry is used for many more purposes than most other Khronos API registries, and is the basis for generating the header files; AsciiDoc include files used in the Specification, and reference pages for interface definitions, parameter and member validity language, and synchronization language; and more.

The canonical location for the registry is the OpenXR-Docs repository in specification/registry/xr.xml, and that is where any changes should be submitted. "Read-only" copies, regularly synchronized, exist in the same relative path in:

  • the OpenXR-SDK repository, for optional, custom code generation by an application. None of the associated scripts are included in this repository, and all generated files are pre-generated, so changes to the XML here do not have any effect except on any custom scripts that might be written explicitly to consume the XML.
  • the OpenXR-SDK-Source repository, for header generation, loader and API layer source generation, and loader documentation generation. Changes to the XML here affect all these generated files and libraries.

Loader and Validation Layers Repositories

There are additional Khronos Github repositories containing OpenXR source code, libraries, and tools.

KhronosGroup/OpenXR-SDK

The OpenXR-SDK repository contains:

  • all OpenXR header files (generated and static)
  • source code and CMake build system for the OpenXR loader that is used for Linux and Windows
  • all generated source files required to build the loader
  • rendered HTML of the loader design doc (in doc/loader/)
  • a copy of the XML registry, for optional custom code generation usage

Most application developers can use this repository, as it provides the header and loader with minimum dependencies, with no requirement for code generation at build time. It is designed for inclusion in your application's source tree, as the loader model for OpenXR on Windows is to bundle the loader (whether statically or dynamically linked) with your application, rather than installing system-wide.

This repository contains a subset of the OpenXR-SDK-Source repository (only the loader source), with the generated source code files pre-generated for easier usage. If you're looking for API layers, sample code, etc. see that repo.

Note: This repository is new for 1.0 - the repository previously located at OpenXR-SDK has been renamed to OpenXR-SDK-Source. The two repositories share the same pre-1.0 git history, however, for ease of migration.

KhronosGroup/OpenXR-SDK-Source

The OpenXR-SDK-Source repository contains:

  • the static OpenXR header file openxr_platform_defines.h
  • source code and CMake build system for
    • the OpenXR loader that is used for Linux and Windows
    • two "beta" API layers, XR_LUNARG_core_validation and XR_LUNARG_api_dump
    • the hello_xr sample application
    • tests for the loader
  • a copy of the XML registry, for required code generation usage
  • code generation scripts (in Python 3) required for the loader, API layers, and tests
  • the loader design document source (in Asciidoctor) and the scripts required to build it

OpenXR-SDK-Source is where development of the loader takes place: changes are migrated to OpenXR-SDK regularly. Unlike that repo, it does not contain the generated headers or source: you need Python 3.6 or newer on your system to compile this repository.

Note: This repository was formerly known as OpenXR-SDK during the 0.90 time frame, and has been renamed to make room for the new, simpler OpenXR-SDK that contains only the loader and headers, and does not require any code generation.

Obsolete: OpenXR 0.90 Provisional API Specification Resources

These are provided for your convenience in porting to 1.0 only. All users of 0.90 should port to the final 1.0 as soon as possible.