cancel
Showing results for 
Search instead for 
Did you mean: 

Direct mode

rupy
Honored Guest
I would like to know how to access the direct mode with simple OpenGL without any fancy features from a standalone program.
3 REPLIES 3

cybereality
Grand Champion
Check out the source code for Oculus Room Tiny that comes with the SDK.

jherico
Adventurer
Here is a single file example of using the Oculus SDK from version 0.6, completely done in OpenGL. Not that for 0.6, there's no distinction between extended and direct mode. The SDK handles output to the Rift display and in fact you can't even query which display is the Rift or if it's in extended or direct mode.

I have other examples for other versions of the SDK if you're interested. Also a book, which should be available very soon, most likely this month.

rupy
Honored Guest
Ok, forgot to precise in LWJGL preferably and without any of the features of the direct mode (timewarp etc.) just a simple cube (for example) rotating in the Rift CV with as little code as possible.

So if I understand the 0.7 release correctly, extended games are no longer welcome?

@jherico I appreciate the standalone C++ "snippet" but holy cow from 0 lines of code to this, what is the gain? How many ms. of latency does this economize?

@cybereality Does the 0.6 SDK contain working C code, that will work with the CV or do I have to wait until 0.7 is released.

The biggest problem with this code is that it is extremely hard to debug since it's coding in the blind with hardware calls that might do or not do different things on a million combinations of hardware.

The consumers are applauding you for ease of use, but the producers are now spending 90% of their time making stuff compatible instead of improving the experience.

This means I'm not building anything on my VR project since the future is always too uncertain as to how possible it will be to write a custom engine to the upcoming headsets.

Edit: Actually for me this changes nothing, as long as the Rift is detected as a monitor on the PC and the sensors send the data to whatever bloatware is receiving them, I'm good. (apparently the Vive does so I'm good even if the Rift doesen't)

But it's hard to invest time into a project that is dependent on a company like Oculus to write the sensor interface and hope that they won't pull the rug from under your feet, like disabling extended mode and not giving you the sensor data unless you run direct mode via unreal or unity!

I wish there was a small standalone JNI .dll to just get the XYZW of orientation and XYZ of position! That would probably take one of your guys half a day and it would simplify the lives of so many that wish to hack on your hardware without being limited by the commercial sides of things.