nuclear@0: /************************************************************************************ nuclear@0: nuclear@0: Filename : CAPI_HMDRenderState.h nuclear@0: Content : Combines all of the rendering state associated with the HMD nuclear@0: Created : February 2, 2014 nuclear@0: Authors : Michael Antonov nuclear@0: nuclear@0: Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved. nuclear@0: nuclear@0: Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); nuclear@0: you may not use the Oculus VR Rift SDK except in compliance with the License, nuclear@0: which is provided at the time of installation or download, or which nuclear@0: otherwise accompanies this software in either electronic or hard copy form. nuclear@0: nuclear@0: You may obtain a copy of the License at nuclear@0: nuclear@0: http://www.oculusvr.com/licenses/LICENSE-3.2 nuclear@0: nuclear@0: Unless required by applicable law or agreed to in writing, the Oculus VR SDK nuclear@0: distributed under the License is distributed on an "AS IS" BASIS, nuclear@0: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. nuclear@0: See the License for the specific language governing permissions and nuclear@0: limitations under the License. nuclear@0: nuclear@0: ************************************************************************************/ nuclear@0: nuclear@0: #ifndef OVR_CAPI_HMDRenderState_h nuclear@0: #define OVR_CAPI_HMDRenderState_h nuclear@0: nuclear@0: #include "../OVR_CAPI.h" nuclear@0: #include "../Kernel/OVR_Math.h" nuclear@0: #include "../Util/Util_Render_Stereo.h" nuclear@0: #include "../Service/Service_NetSessionCommon.h" nuclear@0: nuclear@0: namespace OVR { namespace CAPI { nuclear@0: nuclear@0: using namespace OVR::Util::Render; nuclear@0: nuclear@0: nuclear@0: //------------------------------------------------------------------------------------- nuclear@0: // ***** HMDRenderState nuclear@0: nuclear@0: // Combines all of the rendering setup information about one HMD. nuclear@0: // This structure only ever exists inside HMDState, but this nuclear@0: // declaration is in a separate file to reduce #include dependencies. nuclear@0: // All actual lifetime and update control is done by the surrounding HMDState. nuclear@0: struct HMDRenderState nuclear@0: { nuclear@0: // Utility query functions. nuclear@0: ovrHmdDesc GetDesc() const; nuclear@0: ovrSizei GetFOVTextureSize(int eye, ovrFovPort fov, float pixelsPerDisplayPixel) const; nuclear@0: ovrEyeRenderDesc CalcRenderDesc(ovrEyeType eyeType, const ovrFovPort& fov) const; nuclear@0: nuclear@0: HMDInfo OurHMDInfo; nuclear@0: nuclear@0: HmdRenderInfo RenderInfo; nuclear@0: DistortionRenderDesc Distortion[2]; nuclear@0: ovrEyeRenderDesc EyeRenderDesc[2]; nuclear@0: nuclear@0: // Clear color used for distortion nuclear@0: float ClearColor[4]; nuclear@0: nuclear@0: // Pose at which last time the eye was rendered, as submitted by EndEyeRender. nuclear@0: ovrPosef EyeRenderPoses[2]; nuclear@0: nuclear@0: // Capabilities passed to Configure. nuclear@0: unsigned EnabledHmdCaps; nuclear@0: unsigned DistortionCaps; // enum ovrDistortionCaps nuclear@0: }; nuclear@0: nuclear@0: nuclear@0: }} // namespace OVR::CAPI nuclear@0: nuclear@0: #endif // OVR_CAPI_HMDState_h