Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
Anonymous's avatar
Anonymous
10 years ago
Solved

How to pass a GL texture pointer to ovrTextureSwapChain?

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] = ?
  • 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

  • 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.  
  • Anonymous's avatar
    Anonymous
    Thank you : still struggling a bit but perhaps I will manage to muddle through.