Khronos Releases New OpenXR Tutorial (2024)

Khronos Blog

Khronos Releases New OpenXR Tutorial (1)

by Ron Bessems, Distinguished Software Engineer, Magic Leap, OpenXR Working Group Vice-Chair openxr

Self-guided tutorial provides sample code and detailed instructions teaching developers to create interactive OpenXR applications using Windows, Linux, or Android and a variety of graphics APIs.

The Khronos Group has released a free OpenXR Tutorial, designed to guide software developers through every step of creating an OpenXR application using Windows, Linux or Android. This web-based tutorial, produced by the OpenXR Working Group, is packed with detailed instructions, downloadable archives, and example code snippets to support developers as they set up an OpenXR development environment, connect to their preferred graphics API, and incorporate interactivity, extensions, and other advanced features.

OpenXR was created to help address fragmentation in the XR ecosystem. Before OpenXR, software developers had to write different code paths for every hardware platform, using a different, often proprietary API for each device. OpenXR provides a common API to address AR, VR, MR (collectively known as XR) hardware. Using OpenXR, developers can write code that works with multiple XR platforms with minimal adaptation.

OpenXR isn’t a specific library or code: instead, there are multiple runtimes provided by hardware manufacturers, software companies, and even open source projects. Any OpenXR-compliant code will work with any OpenXR compliant runtime. The OpenXR Tutorial is designed to give developers the building blocks they need to create cross-platform applications for any OpenXR runtime.

Choose Your Own Environment

The OpenXR Tutorial has detailed instructions for creating applications using the Android, Linux or Windows operating system. Currently supported graphics APIs include:

The OpenXR Tutorial is intended for software developers who are familiar with at least one of these compatible graphics APIs. Developers begin the OpenXR Tutorial by selecting the graphics API and platform they plan to use. The tutorial branches from that point forward to provide the appropriate guidance – though developers can change platform/API at any time.

From Setup to Advanced Topics

The OpenXR Tutorial is divided into six chapters, each building upon the last:

  • Introduction
  • OpenXR Setup – teaches developers how to create an instance, create a session, and poll the OpenXR event-based system to handle changes within the XR system.
  • Graphics – demonstrates the interaction between OpenXR and the graphics API, equipping developers to build applications with color, depth and geometry.
  • Interactions – teaches developers how to add interactivity to an application using the OpenXR Interaction System.
  • Extensions – demonstrates how to add extensions to the core OpenXR API, using hand tracking and composition layer depth as examples.
  • Next Steps – describes optional steps to further enhance or add capabilities to an application, including multiview rendering, multithreaded rendering, OpenXR API Layers, and more.

The first five chapters walk developers through the creation of a simple XR application, providing example code and detailed explanations of each concept along the way. By following the tutorial, developers will create a simple interactive VR program that allows the user to play with and build structures out of colored cubes.

The final chapter invites developers to get creative. It introduces advanced topics for further exploration, with examples and links to additional materials to help developers continue their journey with OpenXR.

Basic Requirements

Developers will need the following to complete the tutorial:

  • A Windows or Linux PC to compile the code.
  • An IDE (integrated development environment) that supports the target device: either Visual Studio 2017 or later; or Android Studio.
  • Some XR hardware to run on. This could be an XR device that connects to the PC or an Android-based device like a Meta Quest or Pico Neo. It is also possible to use Monado to emulate XR hardware.
  • CMake 3.22.1
  • Python 3.6+

Explore the Tutorial

Khronos invites all interested developers to dive into the OpenXR Tutorial and explore the fundamentals of creating cross-platform AR and VR applications. Feedback and questions are welcome on the OpenXR Discord, OpenXR Forums, or Issue Tracker.

The OpenXR tutorial is licensed as Creative Common International 4.0 By Attribution (CC-BY), and the code in the tutorial is licensed as Apache 2.0. The full source code for the tutorial is also available on GitHub.

Comments

Khronos Releases New OpenXR Tutorial (2024)

FAQs

Khronos Releases New OpenXR Tutorial? ›

Self-guided tutorial provides sample code and detailed instructions teaching developers to create interactive OpenXR applications using Windows, Linux, or Android and a variety of graphics APIs.

Who made OpenXR? ›

It is developed by a working group managed by the Khronos Group consortium. OpenXR was announced by the Khronos Group on February 27, 2017, during GDC 2017.

What is the OpenXR format? ›

The OpenXR ToolKit supports the following formats: DDS*, PNG, JPG and BMP.

What is OpenXR mode? ›

OpenXR is a royalty-free, open standard that provides a common set of APIs for developing XR applications that run across a wide range of AR and VR devices.

What is OpenXR SDK? ›

OpenXR™ Software Development Kit (SDK) Project. This repository contains OpenXR headers, as well as source code and build scripts for the OpenXR loader. It contains all generated source files and headers pre-generated for minimum dependencies.

Is OpenXR better than SteamVR? ›

There are a few reasons why OpenXR might offer better performance than SteamVR in DCS. First, OpenXR is a newer standard designed to be more efficient. Second, OpenXR can take advantage of specific hardware features and more customizations, which can help to improve performance.

What is the difference between OpenXR and WebXR? ›

WebXR focuses on enabling immersive experiences directly within internet browsers, catering to a broader audience of users. In contrast, OpenXR is specifically designed for creating VR, AR, and MR applications that are compatible across XR devices like mixed reality headsets and VR glasses.

What is the difference between OpenVR and OpenXR? ›

Key Differences Between OpenXR and OpenVR

OpenVR was released earlier in 2015, with OpenXR entering the scene in 2019. OpenXR has extensive extension support for advanced VR features, while OpenVR's feature updates revolve around gaming application enhancements.

What is the difference between OpenXR and Microsoft? ›

Key Differences Between OpenXR and Windows Mixed Reality

OpenXR provides high-performance, royalty-free access to AR/VR, while Windows Mixed Reality operates mainly in VR space. Windows Mixed Reality aims at mass-market entry with compatibility with standard laptops and PCs, OpenXR focuses on extensive hardware reach.

What is the recommended resolution for OpenXR? ›

You should only use in-game render resolution 100% when using the OpenXR Toolkit.

What are the benefits of OpenXR? ›

OpenXR provides a common set of APIs for developing XR applications that work across a range of devices. This reduces the time and cost required for developers to adapt solutions to individual hardware and platforms and, by extension, creates a larger market of easily-adopted solutions for enterprise users.

Is OpenXR an API? ›

OpenXR is an open royalty-free API standard from Khronos, providing engines with native access to a range of devices across the mixed reality spectrum. You can develop using OpenXR on a HoloLens 2 or Windows Mixed Reality immersive VR headset on the desktop.

Where is OpenXR located? ›

In the Run window, type in “regedit” (without quotations) and hit Enter. This will launch the Registry Editor. Locate the following key: HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\OpenXR\1.

How to set up OpenXR? ›

When using the HoloLens 2 emulator, the easiest way to install the OpenXR Tools for Windows Mixed Reality is through the Windows Device Portal. In the Portal, navigate to the "OpenXR" page and then, under Developer Features, select the Install button. This also works on physical HoloLens 2 devices.

What is the OpenXR toolkit? ›

This software provides a collection of useful features to customize and improve existing OpenXR applications, including render upscaling and sharpening, foveated rendering, image post-processing and other game-enhancing tweaks. AS OF 2024, SUPPORT FOR OPENXR TOOLKIT IS DISCONTINUED.

How do I activate OpenXR runtime? ›

What should I do if I have trouble running OpenXR titles?
  1. On your computer, open SteamVR settings.
  2. Under Advanced Settings, click Show.
  3. Click Developer.
  4. Check if Current OpenXR Runtime is set to SteamVR. If Current OpenXR Runtime is not set to SteamVR, click SET STEAMVR AS OPENXR RUNTIME.
  5. Run the OpenXR title again.

Who originally created VR? ›

The first virtual reality headset was created in 1968 by American computer scientist Ivan Sutherland and his student, Bob Sproull.

When did OpenVR come out? ›

Initial Release. OpenVR SDK was released to the public on 30 April 2015 by Valve, for developers to develop SteamVR games and software. It provides support for the HTC Vive Developer Edition, including the SteamVR controller and Lighthouse.

Who made VR world? ›

The History Of Virtual Reality

In 1968, Ivan Sutherland introduced the world to what is commonly considered the first head-mounted augmented reality display, known as "The Sword of Damocles." This groundbreaking invention laid the foundation for the virtual reality devices we use today.

Top Articles
Latest Posts
Article information

Author: Jeremiah Abshire

Last Updated:

Views: 5773

Rating: 4.3 / 5 (74 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Jeremiah Abshire

Birthday: 1993-09-14

Address: Apt. 425 92748 Jannie Centers, Port Nikitaville, VT 82110

Phone: +8096210939894

Job: Lead Healthcare Manager

Hobby: Watching movies, Watching movies, Knapping, LARPing, Coffee roasting, Lacemaking, Gaming

Introduction: My name is Jeremiah Abshire, I am a outstanding, kind, clever, hilarious, curious, hilarious, outstanding person who loves writing and wants to share my knowledge and understanding with you.