diff options
| author | raysan5 <[email protected]> | 2016-05-31 20:08:36 +0200 |
|---|---|---|
| committer | raysan5 <[email protected]> | 2016-05-31 20:08:36 +0200 |
| commit | 8f91ed81c58fd5cdbeda4db5478649bd677712da (patch) | |
| tree | e5dfd2e4784aff7630df89f392fd1498f1bfad7d /examples/oculus_glfw_sample/OculusSDK/LibOVR/Include/OVR_CAPI_D3D.h | |
| parent | d17a0cee1aa53978387e68be58d901bffd1ac0a9 (diff) | |
| download | raylib-8f91ed81c58fd5cdbeda4db5478649bd677712da.tar.gz raylib-8f91ed81c58fd5cdbeda4db5478649bd677712da.zip | |
Updated Oculus sample to Oculus SDK 1.4
Still working on the sample but almost finished. Some rlgl internals
redesign required and it will be ready!
Diffstat (limited to 'examples/oculus_glfw_sample/OculusSDK/LibOVR/Include/OVR_CAPI_D3D.h')
| -rw-r--r-- | examples/oculus_glfw_sample/OculusSDK/LibOVR/Include/OVR_CAPI_D3D.h | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/examples/oculus_glfw_sample/OculusSDK/LibOVR/Include/OVR_CAPI_D3D.h b/examples/oculus_glfw_sample/OculusSDK/LibOVR/Include/OVR_CAPI_D3D.h index 5c6e94eb..50806bca 100644 --- a/examples/oculus_glfw_sample/OculusSDK/LibOVR/Include/OVR_CAPI_D3D.h +++ b/examples/oculus_glfw_sample/OculusSDK/LibOVR/Include/OVR_CAPI_D3D.h @@ -67,8 +67,8 @@ OVR_PUBLIC_FUNCTION(ovrResult) ovr_CreateTextureSwapChainDX(ovrSession session, /// /// <b>Example code</b> /// \code{.cpp} -/// ovr_GetTextureSwapChainBuffer(session, chain, 0, IID_ID3D11Texture2D, &d3d11Texture); -/// ovr_GetTextureSwapChainBuffer(session, chain, 1, IID_PPV_ARGS(&dxgiResource)); +/// ovr_GetTextureSwapChainBufferDX(session, chain, 0, IID_ID3D11Texture2D, &d3d11Texture); +/// ovr_GetTextureSwapChainBufferDX(session, chain, 1, IID_PPV_ARGS(&dxgiResource)); /// \endcode /// OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetTextureSwapChainBufferDX(ovrSession session, @@ -102,6 +102,21 @@ OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetTextureSwapChainBufferDX(ovrSession sessio /// compositor continues to treat is as sRGB. Failure to do so will cause the compositor to apply unexpected gamma conversions leading to /// gamma-curve artifacts. /// +/// +/// <b>Example code</b> +/// \code{.cpp} +/// ovrMirrorTexture mirrorTexture = nullptr; +/// ovrMirrorTextureDesc mirrorDesc = {}; +/// mirrorDesc.Format = OVR_FORMAT_R8G8B8A8_UNORM_SRGB; +/// mirrorDesc.Width = mirrorWindowWidth; +/// mirrorDesc.Height = mirrorWindowHeight; +/// ovrResult result = ovr_CreateMirrorTextureDX(session, d3d11Device, &mirrorDesc, &mirrorTexture); +/// [...] +/// // Destroy the texture when done with it. +/// ovr_DestroyMirrorTexture(session, mirrorTexture); +/// mirrorTexture = nullptr; +/// \endcode +/// /// \see ovr_GetMirrorTextureBufferDX /// \see ovr_DestroyMirrorTexture /// @@ -120,6 +135,15 @@ OVR_PUBLIC_FUNCTION(ovrResult) ovr_CreateMirrorTextureDX(ovrSession session, /// \return Returns an ovrResult indicating success or failure. In the case of failure, use /// ovr_GetLastErrorInfo to get more information. /// +/// <b>Example code</b> +/// \code{.cpp} +/// ID3D11Texture2D* d3d11Texture = nullptr; +/// ovr_GetMirrorTextureBufferDX(session, mirrorTexture, IID_PPV_ARGS(&d3d11Texture)); +/// d3d11DeviceContext->CopyResource(d3d11TextureBackBuffer, d3d11Texture); +/// d3d11Texture->Release(); +/// dxgiSwapChain->Present(0, 0); +/// \endcode +/// OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetMirrorTextureBufferDX(ovrSession session, ovrMirrorTexture mirrorTexture, IID iid, |
