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

Function ovr_GetTextureSwapChainBufferDX

Revive/REV_CAPI_D3D.cpp:35–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33}
34
35OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetTextureSwapChainBufferDX(ovrSession session,
36 ovrTextureSwapChain chain,
37 int index,
38 IID iid,
39 void** out_Buffer)
40{
41 REV_TRACE(ovr_GetTextureSwapChainBufferDX);
42
43 if (!session)
44 return ovrError_InvalidSession;
45
46 if (!chain || !out_Buffer)
47 return ovrError_InvalidParameter;
48
49 if (index < 0)
50 index = chain->CurrentIndex;
51
52 TextureD3D* texture = dynamic_cast<TextureD3D*>(chain->Textures[index].get());
53 if (!texture)
54 return ovrError_InvalidParameter;
55
56 HRESULT hr = texture->Texture()->QueryInterface(iid, out_Buffer);
57 if (FAILED(hr))
58 return ovrError_InvalidParameter;
59
60 return ovrSuccess;
61}
62
63OVR_PUBLIC_FUNCTION(ovrResult) ovr_CreateMirrorTextureDX(ovrSession session,
64 IUnknown* d3dPtr,

Callers

nothing calls this directly

Calls 1

TextureMethod · 0.80

Tested by

no test coverage detected