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.


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.


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.