jherico / OculusSDK

Oculus SDK for Virtual Reality
Other
202 stars 114 forks source link

Create simplified C based SDK for interacting with the HMD and HID #12

Closed jherico closed 10 years ago

jherico commented 11 years ago

There should be a simple, easy to use piece of code that allows developers to interact with the HID and HMD via a very small number of extern "C" functions and opaque handle types, similar to the kind of API's used for X11, or OpenGL. This API should have clear cut procedures for initialization and shutdown and should not evoke the same kind of confusion the mass of pointer wrappers and other C++ complexity of the existing SDK does.

arichnad commented 11 years ago

This is already done.

See https://github.com/ultranbrown/libovr_nsb

I've used it before and it works very well. Make sure to ignore the LibOVR directory (or at least read the WHY_IS_THIS_HERE explanation).

I'm not sure if it includes all of the sensor prediction awesomeness we see in the SDK which is why I decided to jump on this bandwagon once I saw linux support.

jherico commented 11 years ago

I was aware of this but thought it was supposed to be under a different license. Perhaps I'm confusing it with OpenHMD. The API isn't really as clean as I'd like, and I don't like the polling approach they seem to be taking to processing tracker messages. I'd rather the able to just hand off a function pointer to the SDK and say 'call this whenever you get tracker messages'. Also, so the simple API I want to avoid sensor fusion / prediction. I think those should be part of the SDK, but I think they should be another library layered on top of the very simple hardware interfacing API.

It's also possible I should get over myself. I'll reach out to nsb and see how he feels about possibly merging the two projects into one, since he's working under the OVR license.

vectorstorm commented 11 years ago

As a side note, the libovr_nsb project needs to be licensed under the OVR license since it uses code pulled from Oculus's implementation in order to talk to the USB device.

But if your thinking is to implement a C library merely as a wrapper around Oculus's LibOVR in order to hide the ugliness, then that wrapper could be a separate project which merely linked against an unmodified LibOVR -- the C wrapper could then be released under the LGPL or zlib or whatever license you prefer.

Not sure if that really matters, but it's worth pointing out. :)

jherico commented 10 years ago

C API exists in SDK 0.3.x, closing.