Function ovr_sys::directx::ovr_GetMirrorTextureBufferDX
[−]
[src]
pub unsafe extern "C" fn ovr_GetMirrorTextureBufferDX(
session: ovrSession,
mirrorTexture: ovrMirrorTexture,
iid: IID,
out_Buffer: *mut *mut c_void
) -> ovrResult
Get the underlying buffer as any compatible COM interface (similar to QueryInterface
)
in session
Specifies an ovrSession
previously returned by ovr_Create
.
in mirrorTexture
Specifies an ovrMirrorTexture
previously returned by ovr_CreateMirrorTextureDX
in iid
Specifies the interface ID of the interface pointer to query the buffer for.
out out_Buffer
Returns the COM interface pointer retrieved.
Returns an ovrResult
indicating success or failure. In the case of failure, use
ovr_GetLastErrorInfo
to get more information.
Example code, not translated from C
ID3D11Texture2D* d3d11Texture = nullptr; ovr_GetMirrorTextureBufferDX(session, mirrorTexture, IID_PPV_ARGS(&d3d11Texture)); d3d11DeviceContext->CopyResource(d3d11TextureBackBuffer, d3d11Texture); d3d11Texture->Release(); dxgiSwapChain->Present(0, 0);