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

Function ovr_GetTextureSwapChainBufferVk

Revive/REV_CAPI_Vk.cpp:237–261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

235
236OVR_PUBLIC_FUNCTION(ovrResult)
237ovr_GetTextureSwapChainBufferVk(
238 ovrSession session,
239 ovrTextureSwapChain chain,
240 int index,
241 VkImage* out_Image)
242{
243 REV_TRACE(ovr_GetTextureSwapChainBufferDX);
244
245 if (!session)
246 return ovrError_InvalidSession;
247
248 if (!chain || !out_Image)
249 return ovrError_InvalidParameter;
250
251 if (index < 0)
252 index = chain->CurrentIndex;
253
254 TextureVk* texture = dynamic_cast<TextureVk*>(chain->Textures[index].get());
255 if (!texture)
256 return ovrError_RuntimeException;
257
258 *out_Image = texture->Image();
259
260 return ovrSuccess;
261}
262
263OVR_PUBLIC_FUNCTION(ovrResult)
264ovr_CreateMirrorTextureWithOptionsVk(

Callers

nothing calls this directly

Calls 1

ImageMethod · 0.80

Tested by

no test coverage detected