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

Function ovr_CreateMirrorTextureWithOptionsVk

Revive/REV_CAPI_Vk.cpp:264–288  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

262
263OVR_PUBLIC_FUNCTION(ovrResult)
264ovr_CreateMirrorTextureWithOptionsVk(
265 ovrSession session,
266 VkDevice device,
267 const ovrMirrorTextureDesc* desc,
268 ovrMirrorTexture* out_MirrorTexture)
269{
270 REV_TRACE(ovr_CreateMirrorTextureWithOptionsVk);
271
272 if (!session)
273 return ovrError_InvalidSession;
274
275 if (!device || !desc || !out_MirrorTexture)
276 return ovrError_InvalidParameter;
277
278 CompositorVk* compositor = dynamic_cast<CompositorVk*>(session->Compositor.get());
279 if (!compositor)
280 return ovrError_RuntimeException;
281
282 compositor->SetDevice(device);
283
284 if (session->Compositor->GetAPI() != vr::TextureType_Vulkan)
285 return ovrError_RuntimeException;
286
287 return session->Compositor->CreateMirrorTexture(desc, out_MirrorTexture);
288}
289
290OVR_PUBLIC_FUNCTION(ovrResult)
291ovr_GetMirrorTextureBufferVk(

Callers

nothing calls this directly

Calls 3

SetDeviceMethod · 0.80
CreateMirrorTextureMethod · 0.80
GetAPIMethod · 0.45

Tested by

no test coverage detected