aboutsummaryrefslogtreecommitdiffstats
path: root/LibOVR/Src/OVR_CAPI_D3D.h
diff options
context:
space:
mode:
Diffstat (limited to 'LibOVR/Src/OVR_CAPI_D3D.h')
-rw-r--r--LibOVR/Src/OVR_CAPI_D3D.h38
1 files changed, 30 insertions, 8 deletions
diff --git a/LibOVR/Src/OVR_CAPI_D3D.h b/LibOVR/Src/OVR_CAPI_D3D.h
index 112525d..330615d 100644
--- a/LibOVR/Src/OVR_CAPI_D3D.h
+++ b/LibOVR/Src/OVR_CAPI_D3D.h
@@ -26,6 +26,9 @@ limitations under the License.
#ifndef OVR_CAPI_D3D_h
#define OVR_CAPI_D3D_h
+/// @file OVR_CAPI_D3D.h
+/// D3D rendering support.
+
#include "OVR_CAPI.h"
#ifndef OVR_D3D_VERSION
@@ -38,37 +41,51 @@ limitations under the License.
//-----------------------------------------------------------------------------------
// ***** D3D11 Specific
+
#include <d3d11.h>
-// Used to configure slave D3D rendering (i.e. for devices created externally).
+
+/// Used to configure slave D3D rendering (i.e. for devices created externally).
struct ovrD3D11ConfigData
{
- // General device settings.
+ /// General device settings.
ovrRenderAPIConfigHeader Header;
+ /// The D3D device to use for rendering.
ID3D11Device* pDevice;
+ /// The D3D device context to use for rendering.
ID3D11DeviceContext* pDeviceContext;
+ /// A render target view for the backbuffer.
ID3D11RenderTargetView* pBackBufferRT;
+ /// The swapchain that will present rendered frames.
IDXGISwapChain* pSwapChain;
};
+/// Contains D3D11-specific rendering information.
union ovrD3D11Config
{
+ /// General device settings.
ovrRenderAPIConfig Config;
+ /// D3D11-specific settings.
ovrD3D11ConfigData D3D11;
};
-// Used to pass D3D11 eye texture data to ovrHmd_EndFrame.
+/// Used to pass D3D11 eye texture data to ovrHmd_EndFrame.
struct ovrD3D11TextureData
{
- // General device settings.
+ /// General device settings.
ovrTextureHeader Header;
+ /// The D3D11 texture containing the undistorted eye image.
ID3D11Texture2D* pTexture;
+ /// The D3D11 shader resource view for this texture.
ID3D11ShaderResourceView* pSRView;
};
+/// Contains OpenGL-specific texture information.
union ovrD3D11Texture
{
+ /// General device settings.
ovrTexture Texture;
+ /// D3D11-specific settings.
ovrD3D11TextureData D3D11;
};
@@ -76,13 +93,16 @@ union ovrD3D11Texture
#elif defined(OVR_D3D_VERSION) && (OVR_D3D_VERSION == 10)
+#include <d3d10_1.h>
+#include <d3d10.h>
+
//-----------------------------------------------------------------------------------
// ***** D3D10 Specific
-// Used to configure slave D3D rendering (i.e. for devices created externally).
+/// Used to configure slave D3D rendering (i.e. for devices created externally).
struct ovrD3D10ConfigData
{
- // General device settings.
+ /// General device settings.
ovrRenderAPIConfigHeader Header;
ID3D10Device* pDevice;
void* Unused;
@@ -96,10 +116,10 @@ union ovrD3D10Config
ovrD3D10ConfigData D3D10;
};
-// Used to pass D3D10 eye texture data to ovrHmd_EndFrame.
+/// Used to pass D3D10 eye texture data to ovrHmd_EndFrame.
struct ovrD3D10TextureData
{
- // General device settings.
+ /// General device settings.
ovrTextureHeader Header;
ID3D10Texture2D* pTexture;
ID3D10ShaderResourceView* pSRView;
@@ -113,6 +133,8 @@ union ovrD3D10Texture
#elif defined(OVR_D3D_VERSION) && (OVR_D3D_VERSION == 9)
+#include <d3d9.h>
+
//-----------------------------------------------------------------------------------
// ***** D3D9 Specific