Oculus Go Development

On 6/23/20 Oculus announced plans to sunset Oculus Go. Information about dates and alternatives can be found in the Oculus Go introduction.

Oculus Quest Development

All Oculus Quest developers MUST PASS the concept review prior to gaining publishing access to the Quest Store and additional resources. Submit a concept document for review as early in your Quest application development cycle as possible. For additional information and context, please see Submitting Your App to the Oculus Quest Store.

OpenXR Support for Oculus Quest and Quest 2

The OpenXR Mobile SDK includes the resources necessary to use the OpenXR API for native development of VR apps for Oculus Quest and Quest 2. OpenXR offers an alternate development path that allows developers to create portable code that can be used on devices from multiple vendors. Oculus Quest and Oculus Quest 2 are 1.0 adopters.

You can get the Oculus OpenXR Mobile SDK on our Downloads page.

About OpenXR

OpenXR is a royalty-free open standard from the Khronos Group created for the development of high-performance VR applications that run on multiple platforms. OpenXR aims to simplify VR development by enabling developers to reach more platforms while reusing the same code. To read more about OpenXR, see the Khronos OpenXR webpage.

OpenXR Developer Documentation

You can learn about using OpenXR to develop VR apps by reading the OpenXR 1.0 Specification at the Khronos Group site. The site also offers API reference documentation and a PDF reference guide that provides a detailed overview of the API.

Oculus OpenXR Mobile Development

In addition to the documentation from the Khronos Group, this section contains information necessary to develop OpenXR apps for Oculus Quest.

When setting up an OpenXR project for Oculus Quest, add the following activity intent filter to AndroidManifest.xml:

<action android:name="android.intent.action.MAIN" /> <category android:name="com.oculus.intent.category.VR" /> <category android:name="android.intent.category.LAUNCHER" />

OpenXR 1.0 did not include a standard Android loader, and as such Oculus has provided a custom Android loader. The loader library can be found at /OpenXR/Libs/Android/ in this SDK package.

The Oculus specific loader extension, XR_OCULUS_android_initialize_loader, can be found in /OpenXR/Include/openxr_oculus.h. Apps are required to first call xrInitializeLoaderKHR if they intend to call OpenXR entry points before calling xrCreateInstance.

On Android, before loading can occur, the loader must be initialized with platform-specific parameters. These parameters may be specified with the new provisional KHR loader extensions, XR_KHR_loader_init and XR_KHR_loader_init_android.

The provisional KHR loader extensions XR_KHR_loader_init and XR_KHR_loader_init_android are currently defined in /OpenXR/Include/openxr_oculus.h. While provisional, it is possible that the extension are subject to change, but we do not anticipate any changes to these specs. When they are final, they will be defined in openxr.h. On Android, apps are required to first get the function pointer for xrInitializeLoaderKHR via xrGetInstanceProcAddress with a null instance pointer, and then call xrInitializeLoaderKHR with a the XrLoaderInitInfoAndroidKHR struct defined in XR_KHR_loader_init_android.

Due to how the mobile runtime is loaded, the app is required to specify the application JVM and activity. This information is provided at xrCreateInstance time via XR_KHR_android_create_instance. However, OpenXR allows specific entry points to be called before xrCreateInstance. In those cases, the application will be required to first call xrInitializeLoaderKHR providing a valid application JVM and activity.

Getting Started with the OpenXR Mobile SDK

This section walks you through the steps of getting started with hello_xr, a simple cross-platform OpenXR sample in the Khronos Group’s OpenXR-SDK-Source GitHub repository at https://github.com/KhronosGroup/OpenXR-SDK-Source/tree/master/src/tests/hello_xr. Since there is not currently a standard Android OpenXR Loader, some modifications must be made to the sample in order to load the OpenXR runtime on Oculus systems:

  • Link against the Oculus OpenXR loader library in this package at /OpenXR/Libs/Android.
  • In /java/com/khronos/hello_xr/MainActivity.java, load the openxr_loader library before loading the application shared library:
  • Call the xrInitializeLoaderKHR function from the AndroidPlatformPlugin initialization:
    FN_xrInitializeLoaderKHR xrInitializeLoaderKHR;
    XR_NULL_HANDLE, "xrInitializeLoaderKHR", (PFN_xrVoidFunction*)&xrInitializeLoaderKHR);
    if (xrInitializeLoaderKHR != nullptr) {
    XrLoaderInitInfoAndroidKHR loaderInitializeInfoAndroid;
    memset(&loaderInitializeInfoAndroid, 0, sizeof(loaderInitializeInfoAndroid));
    loaderInitializeInfoAndroid.type = XR_TYPE_LOADER_INIT_INFO_ANDROID_KHR;
    loaderInitializeInfoAndroid.next = nullptr;
    loaderInitializeInfoAndroid.applicationVM = data->applicationVM;
    loaderInitializeInfoAndroid.applicationContext = data->applicationActivity;
  • Add the following activity intent filter to AndroidManifest.xml at the application scope:
<action android:name="android.intent.action.MAIN" /> <category android:name="com.oculus.intent.category.VR" /> <category android:name="android.intent.category.LAUNCHER" />

Before running hello_xr, make sure to specify the graphics plugin to use with one of the following adb commands:

  • adb shell setprop debug.xr.graphicsPlugin.OpenGLES
  • adb shell setprop debug.xr.graphicsPlugin.Vulkan