aboutsummaryrefslogtreecommitdiffstats
path: root/LibOVR/Src/OVR_CAPI_D3D.h
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-03-21 21:19:34 +0100
committerSven Gothel <[email protected]>2015-03-21 21:19:34 +0100
commite490c3c7f7bb5461cfa78a214827aa534fb43a3e (patch)
treeb86b0291ef529ec6b75cc548d73599fa9c283cd6 /LibOVR/Src/OVR_CAPI_D3D.h
parent05bb4364bfd9930fb1902efec86446ef035ee07a (diff)
Bump OculusVR RIFT SDK to 0.4.4
Diffstat (limited to 'LibOVR/Src/OVR_CAPI_D3D.h')
-rw-r--r--LibOVR/Src/OVR_CAPI_D3D.h71
1 files changed, 48 insertions, 23 deletions
diff --git a/LibOVR/Src/OVR_CAPI_D3D.h b/LibOVR/Src/OVR_CAPI_D3D.h
index b21de1d..25a6b2e 100644
--- a/LibOVR/Src/OVR_CAPI_D3D.h
+++ b/LibOVR/Src/OVR_CAPI_D3D.h
@@ -5,16 +5,16 @@ Content : D3D specific structures used by the CAPI interface.
Created : November 7, 2013
Authors : Michael Antonov
-Copyright : Copyright 2014 Oculus VR, Inc. All Rights reserved.
+Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved.
-Licensed under the Oculus VR Rift SDK License Version 3.1 (the "License");
+Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
You may obtain a copy of the License at
-http://www.oculusvr.com/licenses/LICENSE-3.1
+http://www.oculusvr.com/licenses/LICENSE-3.2
Unless required by applicable law or agreed to in writing, the Oculus VR SDK
distributed under the License is distributed on an "AS IS" BASIS,
@@ -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,53 @@ limitations under the License.
//-----------------------------------------------------------------------------------
// ***** D3D11 Specific
+#if defined(OVR_OS_WIN32) // Desktop Windows only.
#include <d3d11.h>
+#endif
-// Used to configure slave D3D rendering (i.e. for devices created externally).
-struct ovrD3D11ConfigData
+/// Used to configure slave D3D rendering (i.e. for devices created externally).
+struct OVR_ALIGNAS(8) ovrD3D11ConfigData
{
- // General device settings.
- ovrRenderAPIConfigHeader Header;
- ID3D11Device* pDevice;
- ID3D11DeviceContext* pDeviceContext;
- ID3D11RenderTargetView* pBackBufferRT;
- IDXGISwapChain* pSwapChain;
+ /// 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;
+ /// A UAV for the backbuffer (if using compute shaders)
+ ID3D11UnorderedAccessView* pBackBufferUAV;
+ /// 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.
-struct ovrD3D11TextureData
+/// Used to pass D3D11 eye texture data to ovrHmd_EndFrame.
+struct OVR_ALIGNAS(8) 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,17 +95,21 @@ 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).
-struct ovrD3D10ConfigData
+/// Used to configure slave D3D rendering (i.e. for devices created externally).
+struct OVR_ALIGNAS(8) ovrD3D10ConfigData
{
- // General device settings.
+ /// General device settings.
ovrRenderAPIConfigHeader Header;
ID3D10Device* pDevice;
- void* Unused;
+ void* Unused1; // pDeviceContext in DX11
ID3D10RenderTargetView* pBackBufferRT;
+ void* Unused2; // pBackBufferUAV in DX11
IDXGISwapChain* pSwapChain;
};
@@ -96,10 +119,10 @@ union ovrD3D10Config
ovrD3D10ConfigData D3D10;
};
-// Used to pass D3D10 eye texture data to ovrHmd_EndFrame.
-struct ovrD3D10TextureData
+/// Used to pass D3D10 eye texture data to ovrHmd_EndFrame.
+struct OVR_ALIGNAS(8) ovrD3D10TextureData
{
- // General device settings.
+ /// General device settings.
ovrTextureHeader Header;
ID3D10Texture2D* pTexture;
ID3D10ShaderResourceView* pSRView;
@@ -113,11 +136,13 @@ union ovrD3D10Texture
#elif defined(OVR_D3D_VERSION) && (OVR_D3D_VERSION == 9)
+#include <d3d9.h>
+
//-----------------------------------------------------------------------------------
// ***** D3D9 Specific
// Used to configure D3D9 rendering
-struct ovrD3D9ConfigData
+struct OVR_ALIGNAS(8) ovrD3D9ConfigData
{
// General device settings.
ovrRenderAPIConfigHeader Header;
@@ -133,7 +158,7 @@ union ovrD3D9Config
};
// Used to pass D3D9 eye texture data to ovrHmd_EndFrame.
-struct ovrD3D9TextureData
+struct OVR_ALIGNAS(8) ovrD3D9TextureData
{
// General device settings.
ovrTextureHeader Header;