On this Page
The Oculus SDK is designed to be as easy to integrate as possible. This guide outlines a basic Oculus integration with a C/C++ game engine or application.
We’ll discuss initializing the LibOVR, HMD device enumeration, head tracking, frame timing, and rendering for the Rift.
Many of the code samples below are taken directly from the OculusRoomTiny demo source code (available in
Oculus/LibOVR/Samples/OculusRoomTiny). OculusRoomTiny and OculusWorldDemo are great places to view sample integration code when in doubt about a particular system or feature.
There are three major phases when using the SDK: setup, the game loop, and shutdown.
To add Oculus support to a new application, do the following:
ovr_Createand check the return value to see if it succeeded. You can periodically poll for the presence of an HMD with
A more complete summary of rendering details is provided in the Rendering Setup Outline section.