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

Function ovr_GetTextureSwapChainBufferGL

Revive/REV_CAPI_GL.cpp:29–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27}
28
29OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetTextureSwapChainBufferGL(ovrSession session,
30 ovrTextureSwapChain chain,
31 int index,
32 unsigned int* out_TexId)
33{
34 REV_TRACE(ovr_GetTextureSwapChainBufferGL);
35
36 if (!session)
37 return ovrError_InvalidSession;
38
39 if (!chain || !out_TexId)
40 return ovrError_InvalidParameter;
41
42 if (index < 0)
43 index = chain->CurrentIndex;
44
45 TextureGL* texture = dynamic_cast<TextureGL*>(chain->Textures[index].get());
46 if (!texture)
47 return ovrError_InvalidParameter;
48
49 *out_TexId = texture->Texture;
50 return ovrSuccess;
51}
52
53OVR_PUBLIC_FUNCTION(ovrResult) ovr_CreateMirrorTextureGL(ovrSession session,
54 const ovrMirrorTextureDesc* desc,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected