ovr_sdk
diff 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 diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/LibOVR/Src/CAPI/CAPI_HMDRenderState.h Wed Jan 14 06:51:16 2015 +0200 1.3 @@ -0,0 +1,74 @@ 1.4 +/************************************************************************************ 1.5 + 1.6 +Filename : CAPI_HMDRenderState.h 1.7 +Content : Combines all of the rendering state associated with the HMD 1.8 +Created : February 2, 2014 1.9 +Authors : Michael Antonov 1.10 + 1.11 +Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved. 1.12 + 1.13 +Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); 1.14 +you may not use the Oculus VR Rift SDK except in compliance with the License, 1.15 +which is provided at the time of installation or download, or which 1.16 +otherwise accompanies this software in either electronic or hard copy form. 1.17 + 1.18 +You may obtain a copy of the License at 1.19 + 1.20 +http://www.oculusvr.com/licenses/LICENSE-3.2 1.21 + 1.22 +Unless required by applicable law or agreed to in writing, the Oculus VR SDK 1.23 +distributed under the License is distributed on an "AS IS" BASIS, 1.24 +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1.25 +See the License for the specific language governing permissions and 1.26 +limitations under the License. 1.27 + 1.28 +************************************************************************************/ 1.29 + 1.30 +#ifndef OVR_CAPI_HMDRenderState_h 1.31 +#define OVR_CAPI_HMDRenderState_h 1.32 + 1.33 +#include "../OVR_CAPI.h" 1.34 +#include "../Kernel/OVR_Math.h" 1.35 +#include "../Util/Util_Render_Stereo.h" 1.36 +#include "../Service/Service_NetSessionCommon.h" 1.37 + 1.38 +namespace OVR { namespace CAPI { 1.39 + 1.40 +using namespace OVR::Util::Render; 1.41 + 1.42 + 1.43 +//------------------------------------------------------------------------------------- 1.44 +// ***** HMDRenderState 1.45 + 1.46 +// Combines all of the rendering setup information about one HMD. 1.47 +// This structure only ever exists inside HMDState, but this 1.48 +// declaration is in a separate file to reduce #include dependencies. 1.49 +// All actual lifetime and update control is done by the surrounding HMDState. 1.50 +struct HMDRenderState 1.51 +{ 1.52 + // Utility query functions. 1.53 + ovrHmdDesc GetDesc() const; 1.54 + ovrSizei GetFOVTextureSize(int eye, ovrFovPort fov, float pixelsPerDisplayPixel) const; 1.55 + ovrEyeRenderDesc CalcRenderDesc(ovrEyeType eyeType, const ovrFovPort& fov) const; 1.56 + 1.57 + HMDInfo OurHMDInfo; 1.58 + 1.59 + HmdRenderInfo RenderInfo; 1.60 + DistortionRenderDesc Distortion[2]; 1.61 + ovrEyeRenderDesc EyeRenderDesc[2]; 1.62 + 1.63 + // Clear color used for distortion 1.64 + float ClearColor[4]; 1.65 + 1.66 + // Pose at which last time the eye was rendered, as submitted by EndEyeRender. 1.67 + ovrPosef EyeRenderPoses[2]; 1.68 + 1.69 + // Capabilities passed to Configure. 1.70 + unsigned EnabledHmdCaps; 1.71 + unsigned DistortionCaps; // enum ovrDistortionCaps 1.72 +}; 1.73 + 1.74 + 1.75 +}} // namespace OVR::CAPI 1.76 + 1.77 +#endif // OVR_CAPI_HMDState_h