| 51 | } |
| 52 | |
| 53 | OVR_PUBLIC_FUNCTION(ovrResult) ovr_CreateMirrorTextureGL(ovrSession session, |
| 54 | const ovrMirrorTextureDesc* desc, |
| 55 | ovrMirrorTexture* out_MirrorTexture) |
| 56 | { |
| 57 | REV_TRACE(ovr_CreateMirrorTextureGL); |
| 58 | |
| 59 | if (!desc || !out_MirrorTexture) |
| 60 | return ovrError_InvalidParameter; |
| 61 | |
| 62 | if (!session->Compositor) |
| 63 | { |
| 64 | session->Compositor.reset(CompositorGL::Create()); |
| 65 | if (!session->Compositor) |
| 66 | return ovrError_RuntimeException; |
| 67 | } |
| 68 | |
| 69 | if (session->Compositor->GetAPI() != vr::TextureType_OpenGL) |
| 70 | return ovrError_RuntimeException; |
| 71 | |
| 72 | return session->Compositor->CreateMirrorTexture(desc, out_MirrorTexture); |
| 73 | } |
| 74 | |
| 75 | |
| 76 | OVR_PUBLIC_FUNCTION(ovrResult) ovr_CreateMirrorTextureWithOptionsGL(ovrSession session, |
no test coverage detected