| 27 | } |
| 28 | |
| 29 | OVR_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 | |
| 53 | OVR_PUBLIC_FUNCTION(ovrResult) ovr_CreateMirrorTextureGL(ovrSession session, |
| 54 | const ovrMirrorTextureDesc* desc, |
nothing calls this directly
no outgoing calls
no test coverage detected