Oculus Connect 4 will feature more than 30 sessions across four tracks: Develop, Design, Distribute, and Future.

We kick things off with a keynote address on October 11!
New To The Forum? Click Here To Read The How To Guide. -- Developers Click Here.

Using Oculus SDK with existing initialized OpenGL context

pixeratipixerati Posts: 2
Virtual Boy (or Girl)
I'm trying to build a plugin for the Rift with Autodesk's Motionbuilder. It has it's own encapsulated Rendering class so I just need to feed it FBOs and it'll render to them. The problem is I can't seem to initialize the Rift without it creating it's own independent window, rather than using the existing context set up by the host app Motionbuilder. So I think that when I try to bind the FBO, it's binding to the Rift window's context (I borrowed code from the Tiny Room project) and not actually handing its FBO to the host app's OpenGL instance (i.e. Motionbuilder).

I'm pretty new to OpenGL, but is this accurate and if so how can I get the Rift to work with the host OpenGL context instead of trying to set up its own?
Tagged:

Comments

  • imperativityimperativity Posts: 1,321 Oculus Staff
    Hi,

    I have forwarded your question to the SDK team for their review. I should have a fairly decent amount of information to share with you about this use case next week. Thanks for your patience!
  • pixeratipixerati Posts: 2
    Virtual Boy (or Girl)
    Great, thanks.
  • imperativityimperativity Posts: 1,321 Oculus Staff
    @pixerati

    I have some feedback to share with you from our PC SDK team:

    "The Rift SDK doesn't require the app to create a separate window beyond what it already has. It can create a GL context and render with it. The ORT sample has code written that explicitly creates a window but the window is for mirroring purposes as well as capturing user input (mouse+keyboard) which is a Windows requirement. There's also focus management where the Oculus runtime will select a single VR app to be in focus using the ovrSession ID as well as the process ID.
    The developer coding the VR app needs to make sure the frame buffer its rendering to has its source textures created by the Oculus SDK, and not by the VR app code, or at the very least the VR app needs to blit its own frame buffer contents finally into the SDK created eye textures."

    Let me know if you have any further questions.
Sign In or Register to comment.