Please refactor the C API to avoid breaking OpenGL
Right now there is a single C API for initializing the whole of the SDK... ovr_Initialize. Unfortunately this API does some somewhat hinky low level stuff with OpenGL and Direct3D drivers in order to support Direct HMD mode. This in turn is most likely what causes a lot of the incompatibility issues with things like multi-GPU card systems (in particular Optimus and DisplayLink).
Unfortunately, you must call this function in order to do so much as detect if there are any HMDs connected to the system, and generally speaking, if you want to support Direct HMD mode you have to call them before you've ever set up your first OpenGL context.
I would suggest an alternative. Break up the initialization function into distinct components based on function, specifically, between rendering support (output) and HMD detection and tracking (input). I should be able to call an ovr_InitilializeHmds function and thereafter do pretty much everything I can currently do with the sole exception of ovrHmd_AttachToWindow(). If I detect and HMD, and I detect that it's in direct mode, then I can call another method to initialize the rendering subsystem integration (obviously still prior to creating a context). You can even still retain ovr_Initialize as a single method that just calls both of the broken up methods for compatibility purposes.
This kind of separation should lower the barrier to entry for integrating Rift support into applications. A lot of applications might have performance or stability concerns that would preclude them using the SDK just because a user might have a Rift. If the impact of integrating the SDK to the extent of checking for the existence of a headset can be lowered in this way, OVR might get more uptake on integration.
Unfortunately, you must call this function in order to do so much as detect if there are any HMDs connected to the system, and generally speaking, if you want to support Direct HMD mode you have to call them before you've ever set up your first OpenGL context.
I would suggest an alternative. Break up the initialization function into distinct components based on function, specifically, between rendering support (output) and HMD detection and tracking (input). I should be able to call an ovr_InitilializeHmds function and thereafter do pretty much everything I can currently do with the sole exception of ovrHmd_AttachToWindow(). If I detect and HMD, and I detect that it's in direct mode, then I can call another method to initialize the rendering subsystem integration (obviously still prior to creating a context). You can even still retain ovr_Initialize as a single method that just calls both of the broken up methods for compatibility purposes.
This kind of separation should lower the barrier to entry for integrating Rift support into applications. A lot of applications might have performance or stability concerns that would preclude them using the SDK just because a user might have a Rift. If the impact of integrating the SDK to the extent of checking for the existence of a headset can be lowered in this way, OVR might get more uptake on integration.
