How meta-quest/meta-openxr-sdk works
Project Type and Purpose
• This project is a native OpenXR SDK with a suite of sample applications that demonstrate experimental and pre-release OpenXR APIs specifically for Meta Quest devices (e.g., Meta Quest 2, Quest 3, Quest Pro).
• The SDK provides header files and API definitions (found in the “OpenXR” directory) alongside multiple sample projects (located under “Samples”) that integrate diverse OpenXR extensions and features.
• The README further outlines the variety of samples and their target devices, emphasizing several experimental extensions (e.g., body tracking, hand tracking, scene capture).
File Structure: Key Observations
• Top-Level Directories:
• .github: Contains CI/CD workflows, which implies integration with automated build or release processes.
• OpenXR: Contains header files and API definitions for “meta openxr preview” including various extension headers (e.g., meta_body_tracking_*, meta_hand_tracking_microgestures, etc.).
• Samples: Consists of a large number of sample projects grouped by functionality (e.g., XrHandsFB, XrPassthrough, XrControllers, etc.) with each sample typically having subdirectories for source code (C/C++ files, Java files for Android), build scripts (CMakeLists.txt, build.gradle, etc.), assets, and resources.
• The Samples directory is further subdivided into first-party, third-party components, and sample frameworks. This separation highlights that the project supports both core SDK functionality and practical demonstration apps.
• Build and configuration files (like build.gradle, gradle.properties, CMakeLists.txt) underline that the project is built using multiple toolchains (Android Studio with Gradle, CMake for Windows/Quest Link).
a. OpenXR SDK Core & API Definitions:
• “OpenXR” directory as the core API layer. This component encapsulates the header files, experimental extension definitions, and any helper functions.
• That these definitions are intended to be integrated into the final Khronos OpenXR SDK.
b. Sample Applications:
• Native C/C++ components (for cross-platform, Quest Link support via CMake).
• Android-specific layers (Java activities, Gradle projects).
• Resource management (assets, scripts, shaders).
• How these sample applications depend on and interact with the OpenXR core API.
c. Build & CI/CD Infrastructure:
• CI pipelines from the “.github/workflows” directory that manage tasks like packaging releases.
• Build systems (Gradle for Android, CMake for cross-platform builds) and any external dependency management components.
d. External Dependencies & Device Interactions:
• External tools such as Android Studio, NDK, CMake, as well as the integration with the Meta Quest Link when running samples on Windows.
• Flow from the sample apps to the target hardware (Meta Quest devices) via the OpenXR APIs.
Architectural Patterns and Relationships
• The design follows a modular architecture with a clear separation between the API definition (OpenXR core) and the consumer applications (Samples). This supports easy extensibility and demonstration of various features.
• How build scripts and CI pipelines (build automation) are responsible for compiling and packaging the projects.
• Mention any patterns that stand out, such as the separation of platform-specific code (Android native projects vs. Windows builds) using different build configurations (Gradle, CMake).
Essential Elements
• OpenXR Core Component (header/API definitions)
• Sample Applications (grouped by purpose, e.g., XrHandsFB, XrPassthrough, etc.)
• Build Tools & Scripts (Gradle, CMake, CI workflows)
• External Dependencies and Tools (Android Studio, NDK, CMake and Meta Quest Link)
• Device/Runtime Environment (Meta Quest devices and Headset operations)
• Dependency from Samples to OpenXR Core.
• Data/control flows from Sample Applications to hardware via the API.
• Build flows from source code through CI/CD pipelines.
• Annotations that capture:
• Key architectural patterns (modularity and separation of concerns)
• Versioning and experimental nature of some extensions as highlighted in the README.