2 Creating Your First Rift Interactions
This chapter covers
- • Initializing the Oculus SDK
- • Getting input from the head tracker
- • Rendering output to the display
Working with a Rift is really working with two distinct devices: a set of sensors connected via USB (the head tracker), and a monitor device, connected via HDMI or DVI (the display) as seen in figure 2.1.
Figure 2.1: Tracker data is taken as input and images are sent as output to the Rift

Both of these devices are managed via the Oculus SDK, so the first thing we’ll cover is how to initialize the SDK and open the lines of communication. Once you know how to use the SDK, we can begin working with the Rift.
2.1 SDK Interfaces
The 0.2.x versions of the Oculus SDK were C++ code that handled the interaction with the Rift hardware directly and required the client application to perform the distortion of the rendered content required by the Rift. The 0.3.x series of the SDK supplanted this with a C API that provided a more streamlined and easier to use interface, as well as support for having the SDK perform the distortion on rendered content. The current version of the SDK 0.4.x has made small evolutionary changes to the C API and introduced the concept of the Oculus Runtime.
Since the release of DK2 and version 0.4 of the Oculus software, the software is really broken down into two major components. The runtime and the SDK.
2.1.1 Oculus runtime