Skip to main content
July 26, 2014

SDK 0.4 feedback

I'm adapting my codebase from SDK 0.3.2 to SDK 0.4 right now. I'm using OpenGL and SDK rendering.
Here are my notes so far (still testing with a DK1):

- ovrHmd_EndFrame() sets GL_FRONT_FACE to GL_CW. OpenGL default is GL_CCW. (didn't happen with 0.3.2)
- Enabling TimeWarp results in rendering errors. (worked fine with 0.3.2)
- Direct mode doesn't work at all for me, despite calling ovrHmd_AttachToWindow(). Works with the Oculus demos, though.
- SDK 0.4 requires atls.lib, which is not included in all VC++ editions. It can be obtained via the Windows Driver Kit, though.

    20 replies

    Up and Coming
    July 28, 2014
    After some more tests I have some more problems:

    On a Windows 7 machine (GeForce 560) I can init the Oculus SDK first (just init, no HMD created yet), and then create a GLFW window. Then the DK1 runs in direct mode.
    The DK2 however starts on the Rift, but the rendering is wrong: The left eye rendering is stretched into the right eye and the right eye only displays half of the right eyes rendering (as if the window was stretched in the X axis).
    If I open the window first and then init the Rift SDK, I get no rendering on the Rift.

    On a Windows 8 machine (GeForce 770, latest drivers) I don't get a GL context if I init the Oculus SDK first (again, just the init, no HMD stuff yet) and I define the OpenGL version to get, if I don't set any flags for the context creation, I get a context but then the app crashes (no stacktrace, nothing). If I create the window first and then init the SDK, creating the window works, BUT: in direct mode the Rift stays black - both, DK1 and DK2 (only one was attached to the computer at any time). Tracking however worked (even positional). Also: I did not receive any keyboard inputs but gamepad inputs (not sure if that's related).

    Sum up:
    Win7: window->OVR: DK1: <not tested>
    Win7: window->OVR: DK2: black
    Win7: OVR->window: DK1: ok
    Win7: OVR->window: DK2: artefacts (GL3.3) - crash (highest GL (4.x))
    Win8: window->OVR: DK1: black
    Win8: window->OVR: DK2: black
    Win8: OVR->window: DK1: crash
    Win8: OVR->window: DK2: crash


    So has anyone got GLFW & a Rift working on Windows 8 in direct HMD mode?
    Up and Coming
    July 29, 2014
    "jherico" wrote:
    "Foogywoo" wrote:

    Thanks, the window now create and render properly, but I'm still not able to have the output on the Rift. Extended mode is working fine for me. At which point in your init steps are you calling glfwMakeContextCurrent(window)?


    Same here, if I create a GLFW window before calling ovr_Initialize it works fine, and I can then call move and size to position it based on the HMD I set up later. Creating a GLFW window with a specific version after ovr_Initialize always fails.

    Sometimes I feel like I'm being tested.

    Same here, except I feel like I'm being tested on a subject I haven't studied, but everyone else has. You seem to be passing the tests with flying colors.

    I bet Oculus feel like they are being tested every time they release an SDK, and they keep hoping jherico will give them a pass, but they keep getting a few questions wrong each time.

    I'm not using glfw, but I (or rather, the creators of Dolphin) am creating a window very late in the application, and initializing the Rift very early. Direct HMD isn't working.
    Currently working on Dolphin VR Follow along: https://github.com/CarlKenner/dolphin/commits/VR-Hydra Latest Version: viewtopic.php?f=42&t=11241&start=1020#p249426
    Up and Coming
    July 29, 2014
    Using LWJGL here; Minecraft initialises the Display before we init the Rift. No luck with Direct. And yet the OculusWorldDemo seems to work when compiled for GL.

    It's almost as if the OVR runtime service is allowing the Oculus demos, but not anything else. A bug in the runtime? Would be great if we had the source for that as well to be honest!
    Inspiring
    July 29, 2014
    "StellaArtois" wrote:
    No luck with Direct. And yet the OculusWorldDemo seems to work when compiled for GL.


    You've gotten OculusWorldDemo to work in OpenGL in Direct HMD mode? Can you describe your system setup?
    Brad Davis - Developer for High Fidelity Co-author of Oculus Rift in Action
    Up and Coming
    July 29, 2014
    Using visual studio 2012 Pro, Win 8.1 64bit. 2010 Win SDK. Opened the vs2012 demo project. Changed 'graphics' string to GL. Built and ran in Direct mode. Haven't looked any deeper into it however - so now I'm wondering if it *is* using GL.
    Inspiring
    July 29, 2014
    "StellaArtois" wrote:
    Using visual studio 2012 Pro, Win 8.1 64bit. 2010 Win SDK. Opened the vs2012 demo project. Changed 'graphics' string to GL. Built and ran in Direct mode. Haven't looked any deeper into it however - so now I'm wondering if it *is* using GL.


    You can force GL by altering the SetupGraphicsDeviceSet definition in Platform_Default.h
    Brad Davis - Developer for High Fidelity Co-author of Oculus Rift in Action
    New Participant
    July 30, 2014
    So has anyone got GLFW & a Rift working on Windows 8 in direct HMD mode


    No luck for me: windows 8.1 + nvidia + dk1.
    Actually, the Oculus sample code crash for me in direct HMD mode if I force OpenGL.
    Up and Coming
    July 30, 2014
    Ok, double checking, I'm pretty sure the OculusWorldDemo is now using GL after changing the 'graphics' string to "GL".

    Looking at how they create their windows for both OculusWorldDemo and OculusWorldTiny, they always use the window class name "OVRAppWindow" with ::CreateWindow. It's not something daft like we just have to create our window with the same class name?
    Up and Coming
    July 30, 2014
    "StellaArtois" wrote:
    It's not something daft like we just have to create our window with the same class name?


    No, it's the (second) GL context that fails on Win8 (which works on Win7), see: viewtopic.php?f=34&t=10921&p=151238#p151238 .
    October 25, 2014
    I posted a short follow-up (regarding SDK 0.4.3) here.