rev |
line source |
nuclear@0
|
1 /************************************************************************************
|
nuclear@0
|
2
|
nuclear@0
|
3 Filename : CAPI_HMDRenderState.h
|
nuclear@0
|
4 Content : Combines all of the rendering state associated with the HMD
|
nuclear@0
|
5 Created : February 2, 2014
|
nuclear@0
|
6 Authors : Michael Antonov
|
nuclear@0
|
7
|
nuclear@0
|
8 Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved.
|
nuclear@0
|
9
|
nuclear@0
|
10 Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License");
|
nuclear@0
|
11 you may not use the Oculus VR Rift SDK except in compliance with the License,
|
nuclear@0
|
12 which is provided at the time of installation or download, or which
|
nuclear@0
|
13 otherwise accompanies this software in either electronic or hard copy form.
|
nuclear@0
|
14
|
nuclear@0
|
15 You may obtain a copy of the License at
|
nuclear@0
|
16
|
nuclear@0
|
17 http://www.oculusvr.com/licenses/LICENSE-3.2
|
nuclear@0
|
18
|
nuclear@0
|
19 Unless required by applicable law or agreed to in writing, the Oculus VR SDK
|
nuclear@0
|
20 distributed under the License is distributed on an "AS IS" BASIS,
|
nuclear@0
|
21 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
nuclear@0
|
22 See the License for the specific language governing permissions and
|
nuclear@0
|
23 limitations under the License.
|
nuclear@0
|
24
|
nuclear@0
|
25 ************************************************************************************/
|
nuclear@0
|
26
|
nuclear@0
|
27 #ifndef OVR_CAPI_HMDRenderState_h
|
nuclear@0
|
28 #define OVR_CAPI_HMDRenderState_h
|
nuclear@0
|
29
|
nuclear@0
|
30 #include "../OVR_CAPI.h"
|
nuclear@0
|
31 #include "../Kernel/OVR_Math.h"
|
nuclear@0
|
32 #include "../Util/Util_Render_Stereo.h"
|
nuclear@0
|
33 #include "../Service/Service_NetSessionCommon.h"
|
nuclear@0
|
34
|
nuclear@0
|
35 namespace OVR { namespace CAPI {
|
nuclear@0
|
36
|
nuclear@0
|
37 using namespace OVR::Util::Render;
|
nuclear@0
|
38
|
nuclear@0
|
39
|
nuclear@0
|
40 //-------------------------------------------------------------------------------------
|
nuclear@0
|
41 // ***** HMDRenderState
|
nuclear@0
|
42
|
nuclear@0
|
43 // Combines all of the rendering setup information about one HMD.
|
nuclear@0
|
44 // This structure only ever exists inside HMDState, but this
|
nuclear@0
|
45 // declaration is in a separate file to reduce #include dependencies.
|
nuclear@0
|
46 // All actual lifetime and update control is done by the surrounding HMDState.
|
nuclear@0
|
47 struct HMDRenderState
|
nuclear@0
|
48 {
|
nuclear@0
|
49 // Utility query functions.
|
nuclear@0
|
50 ovrHmdDesc GetDesc() const;
|
nuclear@0
|
51 ovrSizei GetFOVTextureSize(int eye, ovrFovPort fov, float pixelsPerDisplayPixel) const;
|
nuclear@0
|
52 ovrEyeRenderDesc CalcRenderDesc(ovrEyeType eyeType, const ovrFovPort& fov) const;
|
nuclear@0
|
53
|
nuclear@0
|
54 HMDInfo OurHMDInfo;
|
nuclear@0
|
55
|
nuclear@0
|
56 HmdRenderInfo RenderInfo;
|
nuclear@0
|
57 DistortionRenderDesc Distortion[2];
|
nuclear@0
|
58 ovrEyeRenderDesc EyeRenderDesc[2];
|
nuclear@0
|
59
|
nuclear@0
|
60 // Clear color used for distortion
|
nuclear@0
|
61 float ClearColor[4];
|
nuclear@0
|
62
|
nuclear@0
|
63 // Pose at which last time the eye was rendered, as submitted by EndEyeRender.
|
nuclear@0
|
64 ovrPosef EyeRenderPoses[2];
|
nuclear@0
|
65
|
nuclear@0
|
66 // Capabilities passed to Configure.
|
nuclear@0
|
67 unsigned EnabledHmdCaps;
|
nuclear@0
|
68 unsigned DistortionCaps; // enum ovrDistortionCaps
|
nuclear@0
|
69 };
|
nuclear@0
|
70
|
nuclear@0
|
71
|
nuclear@0
|
72 }} // namespace OVR::CAPI
|
nuclear@0
|
73
|
nuclear@0
|
74 #endif // OVR_CAPI_HMDState_h
|