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

Function ovr_CreateTextureSwapChainDX

Revive/REV_CAPI_D3D.cpp:9–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7#include <d3d11.h>
8
9OVR_PUBLIC_FUNCTION(ovrResult) ovr_CreateTextureSwapChainDX(ovrSession session,
10 IUnknown* d3dPtr,
11 const ovrTextureSwapChainDesc* desc,
12 ovrTextureSwapChain* out_TextureSwapChain)
13{
14 REV_TRACE(ovr_CreateTextureSwapChainDX);
15
16 if (!session)
17 return ovrError_InvalidSession;
18
19 if (!d3dPtr || !desc || !out_TextureSwapChain)
20 return ovrError_InvalidParameter;
21
22 if (!session->Compositor)
23 {
24 session->Compositor.reset(CompositorD3D::Create(d3dPtr));
25 if (!session->Compositor)
26 return ovrError_RuntimeException;
27 }
28
29 if (session->Compositor->GetAPI() != vr::TextureType_DirectX)
30 return ovrError_RuntimeException;
31
32 return session->Compositor->CreateTextureSwapChain(desc, out_TextureSwapChain);
33}
34
35OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetTextureSwapChainBufferDX(ovrSession session,
36 ovrTextureSwapChain chain,

Callers

nothing calls this directly

Calls 2

GetAPIMethod · 0.45

Tested by

no test coverage detected