| 289 | |
| 290 | OVR_PUBLIC_FUNCTION(ovrResult) |
| 291 | ovr_GetMirrorTextureBufferVk( |
| 292 | ovrSession session, |
| 293 | ovrMirrorTexture mirrorTexture, |
| 294 | VkImage* out_Image) |
| 295 | { |
| 296 | REV_TRACE(ovr_GetMirrorTextureBufferVk); |
| 297 | |
| 298 | if (!session) |
| 299 | return ovrError_InvalidSession; |
| 300 | |
| 301 | if (!mirrorTexture || !out_Image) |
| 302 | return ovrError_InvalidParameter; |
| 303 | |
| 304 | TextureVk* texture = dynamic_cast<TextureVk*>(mirrorTexture->Texture.get()); |
| 305 | if (!texture) |
| 306 | return ovrError_RuntimeException; |
| 307 | |
| 308 | *out_Image = texture->Image(); |
| 309 | |
| 310 | return ovrSuccess; |
| 311 | } |
| 312 | |