From 8f91ed81c58fd5cdbeda4db5478649bd677712da Mon Sep 17 00:00:00 2001 From: raysan5 Date: Tue, 31 May 2016 20:08:36 +0200 Subject: 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! --- .../OculusSDK/LibOVR/Include/OVR_CAPI_D3D.h | 28 ++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'examples/oculus_glfw_sample/OculusSDK/LibOVR/Include/OVR_CAPI_D3D.h') 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, /// /// Example code /// \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. /// +/// +/// Example code +/// \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. /// +/// Example code +/// \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, -- cgit v1.2.3