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

Function ovr_CreateTextureSwapChainVk

Revive/REV_CAPI_Vk.cpp:209–234  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207
208OVR_PUBLIC_FUNCTION(ovrResult)
209ovr_CreateTextureSwapChainVk(
210 ovrSession session,
211 VkDevice device,
212 const ovrTextureSwapChainDesc* desc,
213 ovrTextureSwapChain* out_TextureSwapChain)
214{
215 REV_TRACE(ovr_CreateTextureSwapChainVk);
216
217 if (!session)
218 return ovrError_InvalidSession;
219
220 if (!device || !desc || !out_TextureSwapChain || desc->Type != ovrTexture_2D)
221 return ovrError_InvalidParameter;
222
223 CompositorVk* compositor = dynamic_cast<CompositorVk*>(session->Compositor.get());
224
225 if (!compositor)
226 return ovrError_RuntimeException;
227
228 compositor->SetDevice(device);
229
230 if (session->Compositor->GetAPI() != vr::TextureType_Vulkan)
231 return ovrError_RuntimeException;
232
233 return session->Compositor->CreateTextureSwapChain(desc, out_TextureSwapChain);
234}
235
236OVR_PUBLIC_FUNCTION(ovrResult)
237ovr_GetTextureSwapChainBufferVk(

Callers

nothing calls this directly

Calls 3

SetDeviceMethod · 0.80
GetAPIMethod · 0.45

Tested by

no test coverage detected