GLFW has no explicit support for the Oculus Rift, but
This guide requires you to use the native API and assumes a certain level of proficiency with system level APIs and the compiler toolchain.
libOVR needs to be initialized before GLFW. This means calling ovr_Initialize
, ovrHmd_Create
and ovrHmd_ConfigureTracking
before glfwInit. Similarly, libOVR must be shut down after GLFW. This means calling ovrHmd_Destroy
and ovr_Shutdown
after glfwTerminate.
If you have an actual Rift connected to your machine you can deduce which GLFW monitor it corresponds to. Doing this requires you to use the native API.
To identify which monitor corresponds to the Rift, compare Win32 display device names. The display device name of a GLFW monitor is returned by glfwGetWin32Monitor and the display device name of the detected Rift is stored in the DisplayDeviceName
member of ovrHmdDesc
.
To identify which monitor corresponds to the Rift, compare OS X display IDs. The display ID of a GLFW monitor is returned by glfwGetCocoaMonitor and the display ID of the detected Rift is stored in the DisplayId
member of ovrHmdDesc
.
At the time of writing, the 0.4 Rift SDK does not yet support X11.
LOL create.
LOL direct.
Last update on Mon Oct 27 2014 for GLFW 3.1.0