Skip to main content
March 30, 2016
Solved

How to pass a GL texture pointer to ovrTextureSwapChain?

  • March 30, 2016
  • 2 replies
  • 1619 views
We are working with our own custom plugin, and are now a bit stuck on how to pass the GL texture handle we have to the ovrLayerEyeFov ld. ( 1.3 SDK )

ld.ColorTexture[0] = ?
    Best answer by jherico
    the `ColorTexture` member of `ovrLayerEyeFov` is an `ovrTextureSwapChain`.  It should be populated with a swap chain you created with `ovr_CreateTextureSwapChainGL`.   

    If the GL texture handle you have is one you got from that swap chain (using `ovr_GetTextureSwapChainBufferGL`) then it's already part of the internals.  If it's some GL texture handle you created, then you need to copy it into the texture handle fetched from the SDK.  

    2 replies

    jhericoAnswer
    Inspiring
    March 30, 2016
    the `ColorTexture` member of `ovrLayerEyeFov` is an `ovrTextureSwapChain`.  It should be populated with a swap chain you created with `ovr_CreateTextureSwapChainGL`.   

    If the GL texture handle you have is one you got from that swap chain (using `ovr_GetTextureSwapChainBufferGL`) then it's already part of the internals.  If it's some GL texture handle you created, then you need to copy it into the texture handle fetched from the SDK.  
    Brad Davis - Developer for High Fidelity Co-author of Oculus Rift in Action
    March 31, 2016
    Thank you : still struggling a bit but perhaps I will manage to muddle through.