ovr_sdk

view LibOVR/Src/CAPI/CAPI_HMDRenderState.h @ 0:1b39a1b46319

initial 0.4.4
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 14 Jan 2015 06:51:16 +0200
parents
children
line source
1 /************************************************************************************
3 Filename : CAPI_HMDRenderState.h
4 Content : Combines all of the rendering state associated with the HMD
5 Created : February 2, 2014
6 Authors : Michael Antonov
8 Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved.
10 Licensed under the Oculus VR Rift SDK License Version 3.2 (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.
15 You may obtain a copy of the License at
17 http://www.oculusvr.com/licenses/LICENSE-3.2
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.
25 ************************************************************************************/
27 #ifndef OVR_CAPI_HMDRenderState_h
28 #define OVR_CAPI_HMDRenderState_h
30 #include "../OVR_CAPI.h"
31 #include "../Kernel/OVR_Math.h"
32 #include "../Util/Util_Render_Stereo.h"
33 #include "../Service/Service_NetSessionCommon.h"
35 namespace OVR { namespace CAPI {
37 using namespace OVR::Util::Render;
40 //-------------------------------------------------------------------------------------
41 // ***** HMDRenderState
43 // Combines all of the rendering setup information about one HMD.
44 // This structure only ever exists inside HMDState, but this
45 // declaration is in a separate file to reduce #include dependencies.
46 // All actual lifetime and update control is done by the surrounding HMDState.
47 struct HMDRenderState
48 {
49 // Utility query functions.
50 ovrHmdDesc GetDesc() const;
51 ovrSizei GetFOVTextureSize(int eye, ovrFovPort fov, float pixelsPerDisplayPixel) const;
52 ovrEyeRenderDesc CalcRenderDesc(ovrEyeType eyeType, const ovrFovPort& fov) const;
54 HMDInfo OurHMDInfo;
56 HmdRenderInfo RenderInfo;
57 DistortionRenderDesc Distortion[2];
58 ovrEyeRenderDesc EyeRenderDesc[2];
60 // Clear color used for distortion
61 float ClearColor[4];
63 // Pose at which last time the eye was rendered, as submitted by EndEyeRender.
64 ovrPosef EyeRenderPoses[2];
66 // Capabilities passed to Configure.
67 unsigned EnabledHmdCaps;
68 unsigned DistortionCaps; // enum ovrDistortionCaps
69 };
72 }} // namespace OVR::CAPI
74 #endif // OVR_CAPI_HMDState_h