MCPcopy Create free account
hub / github.com/LibreVR/Revive / ovr_GetTextureSwapChainBufferGL

Function ovr_GetTextureSwapChainBufferGL

ReviveXR/REV_CAPI_GL.cpp:53–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetTextureSwapChainBufferGL(ovrSession session,
54 ovrTextureSwapChain chain,
55 int index,
56 unsigned int* out_TexId)
57{
58 REV_TRACE(ovr_GetTextureSwapChainBufferGL);
59
60 if (!session)
61 return ovrError_InvalidSession;
62
63 if (!chain || !out_TexId)
64 return ovrError_InvalidParameter;
65
66 if (index < 0)
67 index = chain->CurrentIndex;
68
69 *out_TexId = ((XrSwapchainImageOpenGLKHR*)chain->Images)[index].image;
70 return ovrSuccess;
71}
72
73OVR_PUBLIC_FUNCTION(ovrResult) ovr_CreateMirrorTextureGL(ovrSession session,
74 const ovrMirrorTextureDesc* desc,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected