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

Function ovr_CreateMirrorTextureGL

Revive/REV_CAPI_GL.cpp:53–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53OVR_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
76OVR_PUBLIC_FUNCTION(ovrResult) ovr_CreateMirrorTextureWithOptionsGL(ovrSession session,

Callers 1

Calls 2

CreateMirrorTextureMethod · 0.80
GetAPIMethod · 0.45

Tested by

no test coverage detected