Skip to main content
Participant
June 1, 2015

OpenGL - Non oculus owned eye textures

Pre v0.6 it seemed fairly trivial to send OpenGL textures to the rift that weren't created using SDK function calls. You simply had to set the OGL.TexId in the ovrGLTexture structure before calling ovrHmd_EndFrame. I had some difficulty getting them to display perfectly, but in v0.6 I'm having difficulty getting them to work at all.

I've tried creating my own ovrSwapTextureSet, but I get an access violation when calling ovrHmd_SubmitFrame. I'm worried that there's some magic happening behind ovrHmd_CreateSwapTextureSetGL that I can't duplicate.

Has anyone tried this? The renderer I'm using needs to create its own eye textures, and I can verify (using glGetTexImage) that the textures are valid, I just need to submit them to the rift somehow.

    3 replies

    Up and Coming
    June 2, 2015
    I think the textureSet already has the textures populated for you, and I guess we are supposed to use these, since the SDK will 'own' them.
    DK2, MBP (mid 2010) OSX 10.10.3. Win7 - i5 4670K - GTX770. Java LWJGL 3 OpenGL Experiments: https://github.com/WhiteHexagon
    CadsoftITAuthor
    Participant
    June 4, 2015
    So for now I'm just letting both oculus and our renderer own their own textures, and then blitting from the renderer's textures to oculus' textures every frame.
    Up and Coming
    July 29, 2015
    hi, i am having the exact same problem. since the update to .6, overwriting the texID is no longer working. @CadsoftIT would you mind sharing the code to your solution? that would be a great help to me. thanks in advance!