Forum Discussion
2EyeGuy
12 years agoAdventurer
The SDK is too object oriented
Admittedly, I don't have a Rift, and I'm trying to use the SDK blind. But I'm not really liking this SDK's structure, or the structure of the samples. It looks like it was designed to be complicated a...
JWB
12 years agoHonored Guest
"many" wrote:"longshot" wrote:
I'd prefer it if the SDK, at least the portions for directly dealing with the hardware, was written in C, instead of C++.
The reason being, is that writing bindings for other languages( lua, python, lisp, ruby etc... ), is generally trivial for libraries written in straight C. When libraries are written in C++, writing bindings can turn into an ordeal.
It is cleaner to wrap C code in C++, than it is to wrap C++ code in C. So my hope is that the lower level portions of the SDK could be done in C, thus ensuring the broadest amount of language support."atavener" wrote:
If Oculus does provide a lower level C layer, not only is binding more sensible for other languages, but some dependencies can be removed. No need to have libstdc++ linked in, and no need for built-in threading. Threading can be provided by the application if it so desires threaded device or sensor handling... OR, the higher level C++ SDK with bells-and-whistles can be used.
I concur.
It would certainly simplify integration with something like libSDL (or Python), which would be an incredible boon for the gaming industry given its cross-platform nature.
"libsdl.org" wrote:
SDL is written in C, but works with C++ natively, and has bindings to several other languages, including Ada, C#, D, Eiffel, Erlang, Euphoria, Go, Guile, Haskell, Java, Lisp, Lua, ML, Oberon/Component Pascal, Objective C, Pascal, Perl, PHP, Pike, Pliant, Python, Ruby, Smalltalk, and Tcl.
"atavener" wrote:
I think a simple C layer using HIDAPI would be a good basis for the larger SDK, but that might just be me. The hardware abstraction needed is tiny....
Regardless, this is the low level API I'm cobbling together (on hold until Rift arrives, so I can see that I've got HID stuff right). What I come up with will likely be just enough for my needs, and potentially troublesome with new hardware... so official support for a lean API would be very welcome!
Have you begun work on this yet? Hosted anywhere for collaboration (I don't have a Rift yet either)?
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 8 months ago
- 3 years ago
- 1 year ago
- 3 years ago