Bike-X  0.8
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
CAPI_DistortionRenderer.cpp
Go to the documentation of this file.
1 /************************************************************************************
2 
3 Filename : CAPI_DistortionRenderer.cpp
4 Content : Combines all of the rendering state associated with the HMD
5 Created : February 2, 2014
6 Authors : Michael Antonov
7 
8 Copyright : Copyright 2014 Oculus VR, Inc. All Rights reserved.
9 
10 Licensed under the Oculus VR Rift SDK License Version 3.1 (the "License");
11 you may not use the Oculus VR Rift SDK except in compliance with the License,
12 which is provided at the time of installation or download, or which
13 otherwise accompanies this software in either electronic or hard copy form.
14 
15 You may obtain a copy of the License at
16 
17 http://www.oculusvr.com/licenses/LICENSE-3.1
18 
19 Unless required by applicable law or agreed to in writing, the Oculus VR SDK
20 distributed under the License is distributed on an "AS IS" BASIS,
21 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 See the License for the specific language governing permissions and
23 limitations under the License.
24 
25 ************************************************************************************/
26 
28 
29 #if defined (OVR_OS_WIN32)
30 
31 // TBD: Move to separate config file that handles back-ends.
32 #define OVR_D3D_VERSION 11
33 #include "D3D1X/CAPI_D3D1X_DistortionRenderer.h"
34 #undef OVR_D3D_VERSION
35 
36 #define OVR_D3D_VERSION 10
37 #include "D3D1X/CAPI_D3D1X_DistortionRenderer.h"
38 #undef OVR_D3D_VERSION
39 
40 #define OVR_D3D_VERSION 9
41 #include "D3D1X/CAPI_D3D9_DistortionRenderer.h"
42 #undef OVR_D3D_VERSION
43 
44 #endif
45 
47 
48 namespace OVR { namespace CAPI {
49 
50 //-------------------------------------------------------------------------------------
51 // ***** DistortionRenderer
52 
53 // TBD: Move to separate config file that handles back-ends.
54 
56 {
57  0, // None
59  0, // Android_GLES
60 #if defined (OVR_OS_WIN32)
61  &D3D9::DistortionRenderer::Create,
62  &D3D10::DistortionRenderer::Create,
63  &D3D11::DistortionRenderer::Create
64 #else
65  0,
66  0,
67  0
68 #endif
69 };
70 
71 
72 }} // namespace OVR::CAPI
73 
static CAPI::DistortionRenderer * Create(ovrHmd hmd, FrameTimeManager &timeManager, const HMDRenderState &renderState)
DistortionRenderer *(* CreateFunc)(ovrHmd hmd, FrameTimeManager &timeManager, const HMDRenderState &renderState)
static CreateFunc APICreateRegistry[ovrRenderAPI_Count]