Skip to content

Meta OpenXR SDK includes OpenXR API resources for all Quest devices native development. Your use of this SDK or tool is subject to the Oculus SDK License Agreement, available at https://developer.oculus.com/licenses/oculussdk/

License

Notifications You must be signed in to change notification settings

meta-quest/Meta-OpenXR-SDK

Repository files navigation

Meta OpenXR SDK / Samples

Introduction

Welcome to the Meta OpenXR SDK project, a native OpenXR SDK and samples specifically designed for Meta Quest. This SDK is a comprehensive resource that includes header files and API definitions for both experimental and pre-release OpenXR APIs.

As these API definitions reach their final stages, they will be incorporated into the OpenXR SDK. To help you understand and utilize these features, we've included a variety of samples. These samples serve as practical demonstrations, showing you how to integrate and use the APIs effectively.

What are the samples?

Sample Name OpenXR features / extensions shown Target devices Extra notes
XrBodyFaceEyeSocial XR_FB_body_tracking, XR_FB_eye_tracking_social, XR_FB_face_tracking Meta Quest Pro
XrColocationDiscovery XR_META_colocation_discovery, XR_META_spatial_entity_group_sharing, and XR_META_spatial_entity_sharing Meta Quest 2 and later devices
XrColorSpaceFB XR_FB_color_space All Meta Quest devices
XrCompositor_NativeActivity XR_KHR_composition_layer_cube, XR_KHR_composition_layer_cylinder, XR_KHR_composition_layer_equirect2, XR_FB_foveation All Meta Quest devices Single file C sample
XrControllers XR_FB_haptic_amplitude_envelope, XR_FB_haptic_pcm Meta Quest 2 and later devices
XrDynamicObjects XR_META_dynamic_object_tracker Meta Quest 3 and later devices
XrHandDataSource XR_EXT_hand_tracking_data_source Meta Quest 2 and later devices
XrHandsAndControllers XR_META_detached_controllers,XR_META_simultaneous_hands_and_controllers Meta Quest 3 and later
XrHandsFB XR_FB_hand_tracking_mesh, XR_FB_hand_tracking_capsules,XR_FB_hand_tracking_aim All Meta Quest devices
XrHandTrackingWideMotionMode XR_META_hand_tracking_wide_motion_mode Meta Quest 3 and later
XrInput OpenXR Action System All Meta Quest devices
XrKeyboard XR_FB_keyboard_tracking,XR_FB_passthrough_keyboard_hands,XR_FB_render_model Meta Quest 2 and later
XrPassthrough XR_FB_passthrough All Meta Quest devices Demonstrates the use of still and animated styles, selective and projected passthrough.
XrPassthroughOcclusion XR_META_envionment_depth Meta Quest 3 and later
XrSceneModel XR_FB_scene_capture, XR_FB_scene, XR_FB_spatial_entity, XR_FB_spatial_entity_query, XR_FB_spatial_entity_container, XR_META_spatial_entity_mesh, XR_META_boundary_visibility Meta Quest 2 and later Demonstrates a scene-aware experience including floor, walls, and furniture.
XrSpaceWarp XR_FB_space_warp Meta Quest 2 and later
XrSpatialAnchor XR_FB_spatial_entity, XR_FB_spatial_entity_query, XR_FB_spatial_entity_storage, XR_FB_spatial_entity_storage_batch, XR_FB_spatial_entity_sharing, XR_FB_spatial_entity_user Meta Quest 2 and later
XrVirtualKeyboard XR_META_virtual_keyboard,XR_FB_render_model Meta Quest 2 and later

Build

Enable Quest system property to use experimental features, you will need the command: adb shell setprop debug.oculus.experimentalEnabled 1.

Note: This value resets with each headset reboot.

Android

Dependencies

  • Android Studio
    • The lastest Android Studio release is recommended.
    • If you have agreed with the licenses previously on your development system, Android Studio will automatically install, at the start up time. Otherwise (or if the installation failed), you need to install the required CMake and NDK manually, refer to the official instructions for the detailed steps. The default installed locations are:
      • $SDK-ROOT-DIR/ndk/$ndkVersion for NDK.
      • $SDK-ROOT-DIR/cmake/$cmake-version for CMake.

Build with CMake on Android Studio

  1. If this is the first time you are launching Android Studio, select Open an existing Android Studio project. If you have launched Android Studio before, click File > Open instead.
  2. Open build.gradle under Samples folder
    • You could also open individual sample app from the Samples/XrSamples folders. For example, Samples/XrSamples/XrHandsFB/Projects/Android/build.gradle
  3. After the build has finished, directly run a sample with the device connected. Click Run in the toolbar.

Meta Quest Link

While the samples provided in this package are designed as Quest Native / Android samples, some of them can be built and run on Windows for Meta Quest Link. For building with Meta Quest Link, you'll need:

Notes for running samples with Meta Quest Link

  • Ensure that Developer Runtime Features is enabled in the Meta Quest Link application.
  • Make sure the headset is on, the Meta Quest Link application is running and Meta Quest Link is started; before double-click and launch the sample.

More details

See the CONTRIBUTING file for how to help out.

License

Meta OpenXR SDK is subject to the Oculus SDK License Agreement, as found in the LICENSE file.

About

Meta OpenXR SDK includes OpenXR API resources for all Quest devices native development. Your use of this SDK or tool is subject to the Oculus SDK License Agreement, available at https://developer.oculus.com/licenses/oculussdk/

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages