cancel
Showing results for 
Search instead for 
Did you mean: 

Using Oculus SDK with existing initialized OpenGL context

pixerati
Honored Guest
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?
5 REPLIES 5

pixerati
Honored Guest
Great, thanks.

pixerati
Honored Guest
Thanks. Yes, I found some of this on a couple of other forum posts. I think blitting is probably my best bet. Will try to incorporate in the next couple of days. Thanks for taking the time to follow up.


pixerati
Honored Guest
OK, so here's what's grinding me to a halt every time:

the glGenFramebuffers function.

This crashes without fail. From what I can tell, this is typically because glewInit() hasn't been called. But I can't call it, because OVR_CAPI_GL.h won't let me include it. Any ideas?

pixerati
Honored Guest
Seems the problem is that OVR_CAPI_GL.h is using an incompatible version of Glew...? Can I override this?

pixerati
Honored Guest
Found this in an old thread. Hard to believe this is still an issue from 2014, but I'm getting the same kind of exception with the glGenFrameBuffers crash. Does anyone on the Oculus team have a suggested workaround?

https://forums.oculus.com/community/discussion/13903/opengl-0-4-2-please-stop