Native Source Code

This section describes mobile native source code development.

The native Mobile SDK provides the VrApi library and a set of sample applications that demonstrate its use.

VrApi provides the minimum required API for rendering scenes in VR. Applications may query VrApi for orientation data, and submit textures to apply distortion, sensor fusion, and compositing. The VrApi Input API allows developers to query the state of connected devices, such as the Oculus Quest controllers. Developers working with a third-party engine other than Unity or Unreal will use VrApi to integrate the Mobile SDK. For detailed information, see Native Engine Integration.

The VrApi is shipped as a set of public include files, and a pre-built shared library. Providing the VrApi in a separate shared library allows the VrApi implementation to be updated after an application has been released, making it easy to apply hot fixes, implement new optimizations, and add support for new devices without requiring applications to be recompiled with a new SDK.

See the VrSamples/VrCubeWorld projects for examples of how to integrate VrApi into third-party engines. Please see Native Samples for more details.

Main Components

ComponentDescriptionSource code folder
VrApiThe Virtual Reality API provides a minimal set of entry points for enabling VR rendering in native applications and third-party engines.VrApi
VrApi IncludesHeader files for the VrApi library.VrApi/Includes
Native SamplesSample projects illustrating use of VrApi.VrSamples