0

I am getting code from hellovr_opengl and would to render 2D frames.

In the openvr sdk you should render before calling submit function.

What I am doing is generating texture m_itxture then in loop I link rdb data to m_itexture. Here is how my renderFrame looks like :

    RenderStereoTargets();
    //RenderCompanionWindow();

    vr::Texture_t rightEyeTexture = { (void*)(uintptr_t)rightEyeDesc.m_nResolveTextureId, vr::TextureType_OpenGL, vr::ColorSpace_Gamma };
    vr::VRCompositor()->Submit(vr::Eye_Right, &rightEyeTexture,  NULL, vr::Submit_Default);
    //leftEyeDesc.m_nResolveTextureId = m_iTexture;
    vr::Texture_t leftEyeTexture = { (void*)(uintptr_t)leftEyeDesc.m_nResolveTextureId, vr::TextureType_OpenGL, vr::ColorSpace_Gamma };
    vr::VRCompositor()->Submit(vr::Eye_Left, &leftEyeTexture,  NULL, vr::Submit_Default);

but I don't know how to link m_itexture to leftEyeDesc.m_nResolveTextureId in RenderStereoTargets() method

any help ?

Michael IV
  • 11,016
  • 12
  • 92
  • 223
Lhou A
  • 69
  • 1
  • 11
  • 1
    Right now it's unclear what you're asking. What do you mean by *"render 2D frames"*? What does *"link m_itexture to m_nResolveTextureId"* mean and why do you want to do it? What's *"rdb data"*? Please provide a [Minimal, Complete, and Verifiable example](https://stackoverflow.com/help/mcve) and give a better description of what you're trying to do and why/how it's not working. – Max Vollmer Apr 03 '18 at 17:55
  • Hi Max, I didn't want to copy many codes in order to be readable , but I put some pieces here in openGL forum https://www.opengl.org/discussion_boards/showthread.php/200570-OPENGL-and-openvr-render-2D-images?p=1290926#post1290926 – Lhou A Apr 04 '18 at 07:50
  • Hi Max, currently I can map directly decoded frame but left and right eyes seems to be inverted!! (these is some opverlap between both eyes) !!! – Lhou A Apr 04 '18 at 15:09

0 Answers0