Function ovr_sys::directx::ovr_GetTextureSwapChainBufferDX
[−]
[src]
pub unsafe extern "C" fn ovr_GetTextureSwapChainBufferDX(
session: ovrSession,
chain: ovrTextureSwapChain,
index: c_int,
iid: IID,
out_Buffer: *mut *mut c_void
) -> ovrResult
Get a specific buffer within the chain as any compatible COM interface (similar to QueryInterface)
in session Specifies an ovrSession previously returned by ovr_Create.
in chain Specifies an ovrTextureSwapChain previously returned by ovr_CreateTextureSwapChainDX
in index Specifies the index within the chain to retrieve. Must be between 0 and length (see ovr_GetTextureSwapChainLength),
or may pass -1 to get the buffer at the CurrentIndex location. (Saving a call to GetTextureSwapChainCurrentIndex)
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
ovr_GetTextureSwapChainBufferDX(session, chain, 0, IID_ID3D11Texture2D, &d3d11_texture); ovr_GetTextureSwapChainBufferDX(session, chain, 1, IID_PPV_ARGS(&dxgi_resource));