| 61 | } |
| 62 | |
| 63 | OVR_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 | |
| 89 | OVR_PUBLIC_FUNCTION(ovrResult) ovr_CreateMirrorTextureWithOptionsDX(ovrSession session, |
| 90 | IUnknown* d3dPtr, |
no test coverage detected