Skip to main content
Up and Coming
July 28, 2014

ovrHmd_AttachToWindow?

Hi,

can anyone give me a hint on how to get the ovrHmd_AttachToWindow working with client side rendering?

Right now I tried this:
Init my OpenGL window (in fact it is a QGLWidget since our application is Qt-based). Then I initalize the oculus and the HMD. After that I grap the native windows handle of its parent window:
HWND handle = (HWND)parentWidget->winId();
Then I call ovrHmd_AttachToWindow( hmd, static_cast<void*>(handle), nullptr, nullptr);

The call returns true but my oculus display just stays black. Is there anything else I need to do? Resize the Window to a specific size?

Kind regards
Michael

    5 replies

    Up and Coming
    July 29, 2014
    I can't get it working either.
    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
    See this thread: viewtopic.php?f=34&t=10921 . OpenGL seems not to work in direct HMD mode so far, even as an extended desktop I didn't get usable results yet (lots of stuttering so far).
    Up and Coming
    July 29, 2014
    "MichaelNikelsky" wrote:
    Hi,

    can anyone give me a hint on how to get the ovrHmd_AttachToWindow working with client side rendering?

    Right now I tried this:
    Init my OpenGL window (in fact it is a QGLWidget since our application is Qt-based). Then I initalize the oculus and the HMD. After that I grap the native windows handle of its parent window:
    HWND handle = (HWND)parentWidget->winId();
    Then I call ovrHmd_AttachToWindow( hmd, static_cast<void*>(handle), nullptr, nullptr);

    The call returns true but my oculus display just stays black. Is there anything else I need to do? Resize the Window to a specific size?

    Kind regards
    Michael


    Can you try this order:

    ovr_Initialize
    ovrHmd_Create
    QT based window creation & OpenGL context creation
    ovrHmd_AttachToWindow
    ovrHmd_ConfigureRendering ( in case of direct HMD mode )
    Up and Coming
    July 31, 2014
    "renderingpipeline" wrote:
    (...), even as an extended desktop I didn't get usable results yet (lots of stuttering so far).

    The problem seems to be the vsync being taken from the primary display and not from the Rift-display. I'm currently investigating how to fix this.
    Watch panoramic 3D photos, videos and do FPV-flying with LiveViewRift! viewtopic.php?f=28&t=11001
    Up and Coming
    July 31, 2014
    "mrjazz" wrote:

    The problem seems to be the vsync being taken from the primary display and not from the Rift-display. I'm currently investigating how to fix this.


    Set the Rift as the primary screen works for me (also: only use the Rift).