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

Function ovr_CreateMirrorTextureDX

Revive/REV_CAPI_D3D.cpp:63–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61}
62
63OVR_PUBLIC_FUNCTION(ovrResult) ovr_CreateMirrorTextureDX(ovrSession session,
64 IUnknown* d3dPtr,
65 const ovrMirrorTextureDesc* desc,
66 ovrMirrorTexture* out_MirrorTexture)
67{
68 REV_TRACE(ovr_CreateMirrorTextureDX);
69
70 if (!session)
71 return ovrError_InvalidSession;
72
73 if (!d3dPtr || !desc || !out_MirrorTexture)
74 return ovrError_InvalidParameter;
75
76 if (!session->Compositor)
77 {
78 session->Compositor.reset(CompositorD3D::Create(d3dPtr));
79 if (!session->Compositor)
80 return ovrError_RuntimeException;
81 }
82
83 if (session->Compositor->GetAPI() != vr::TextureType_DirectX)
84 return ovrError_RuntimeException;
85
86 return session->Compositor->CreateMirrorTexture(desc, out_MirrorTexture);
87}
88
89OVR_PUBLIC_FUNCTION(ovrResult) ovr_CreateMirrorTextureWithOptionsDX(ovrSession session,
90 IUnknown* d3dPtr,

Callers 1

Calls 2

CreateMirrorTextureMethod · 0.80
GetAPIMethod · 0.45

Tested by

no test coverage detected