This section describes mobile native source code development.
The native SDK provides four basic native libraries:
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 Gear VR and Oculus Go 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 VrAppFramework handles VrApi integration and provides a wrapper around Android activity that manages the Android lifecycle. The VrAppFramework is the basis for several of our samples, including Oculus Video and Oculus 360 Photos. If you are not using Unity, Unreal, or another integration and you would like a basic framework to help get started, we recommend that you have a look.
VrAppSupport and LibOVRKernel provide minimal functionality to applications using VrAppFramework, such as GUI, sound, and locale management.
LibOVRKernel and VrAppFramework ship with full source. 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. The VrApi is periodically updated automatically to Samsung phones - for release notes, see System Activities/VrApi Release Notes.
See the VrSamples/VrCubeWorld projects for examples of how to integrate VrApi into third-party engines. Please see Native Samples for more details.
|Component||Description||Source code folder|
|VrApi||The Virtual Reality API provides a minimal set of entry points for enabling VR rendering in native applications and third-party engines.||VrApi|
|VrApi Includes||Header files for the VrApi library.||VrApi/Includes|
|Application Framework||Framework and support code for native applications. Includes code for rendering, user interfaces, sound playback, and more. It is not meant to provide the functionality of a full-fledged engine, but it does provide structure and a lot of useful building blocks for building native applications.||VrAppFramework/Src|
|VrAppFramework Includes||Header files for the VrAppFramework library.||VrAppFramework/Include|
|Native Samples||Sample projects illustrating use of VrApi.||VrSamples|
|LibOVRKernel||The Oculus library.||LibOVRKernel/Src|