oculus1

annotate libovr/Src/win32/OVR_Win32_SensorDevice.cpp @ 20:ff3bfd4da86b

removed unnecessary check for framebuffer resizing when not using vr mode
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 01 Oct 2013 12:51:20 +0300
parents
children
rev   line source
nuclear@1 1 /************************************************************************************
nuclear@1 2
nuclear@1 3 Filename : OVR_Win32_SensorDevice.cpp
nuclear@1 4 Content : Win32 SensorDevice implementation
nuclear@1 5 Created : March 12, 2013
nuclear@1 6 Authors : Lee Cooper
nuclear@1 7
nuclear@1 8 Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved.
nuclear@1 9
nuclear@1 10 Use of this software is subject to the terms of the Oculus license
nuclear@1 11 agreement provided at the time of installation or download, or which
nuclear@1 12 otherwise accompanies this software in either electronic or hard copy form.
nuclear@1 13
nuclear@1 14 *************************************************************************************/
nuclear@1 15
nuclear@1 16 #include "OVR_Win32_SensorDevice.h"
nuclear@1 17
nuclear@1 18 #include "OVR_Win32_HMDDevice.h"
nuclear@1 19 #include "OVR_SensorImpl.h"
nuclear@1 20 #include "OVR_DeviceImpl.h"
nuclear@1 21
nuclear@1 22 namespace OVR { namespace Win32 {
nuclear@1 23
nuclear@1 24 } // namespace Win32
nuclear@1 25
nuclear@1 26 //-------------------------------------------------------------------------------------
nuclear@1 27 void SensorDeviceImpl::EnumerateHMDFromSensorDisplayInfo
nuclear@1 28 (const SensorDisplayInfoImpl& displayInfo,
nuclear@1 29 DeviceFactory::EnumerateVisitor& visitor)
nuclear@1 30 {
nuclear@1 31
nuclear@1 32 Win32::HMDDeviceCreateDesc hmdCreateDesc(&Win32::HMDDeviceFactory::Instance, String(), String());
nuclear@1 33 hmdCreateDesc.SetScreenParameters( 0, 0,
nuclear@1 34 displayInfo.HResolution, displayInfo.VResolution,
nuclear@1 35 displayInfo.HScreenSize, displayInfo.VScreenSize);
nuclear@1 36
nuclear@1 37 if ((displayInfo.DistortionType & SensorDisplayInfoImpl::Mask_BaseFmt) == SensorDisplayInfoImpl::Base_Distortion)
nuclear@1 38 hmdCreateDesc.SetDistortion(displayInfo.DistortionK);
nuclear@1 39 if (displayInfo.HScreenSize > 0.14f)
nuclear@1 40 hmdCreateDesc.Set7Inch();
nuclear@1 41
nuclear@1 42 visitor.Visit(hmdCreateDesc);
nuclear@1 43 }
nuclear@1 44
nuclear@1 45 } // namespace OVR
nuclear@1 46
nuclear@1 47