oculus1

view libovr/Src/osx/OVR_OSX_SensorDevice.cpp @ 26:75ab0d4ce2bb

backed out the shaderless oculus distortion method, as it's completely pointless
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 04 Oct 2013 14:57:33 +0300
parents
children
line source
1 /************************************************************************************
3 Filename : OVR_OSX_SensorDevice.cpp
4 Content : OSX SensorDevice implementation
5 Created : March 14, 2013
6 Authors : Lee Cooper
8 Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved.
10 Use of this software is subject to the terms of the Oculus license
11 agreement provided at the time of installation or download, or which
12 otherwise accompanies this software in either electronic or hard copy form.
14 *************************************************************************************/
16 #include "OVR_OSX_HMDDevice.h"
17 #include "OVR_SensorImpl.h"
18 #include "OVR_DeviceImpl.h"
20 namespace OVR { namespace OSX {
22 } // namespace OSX
24 //-------------------------------------------------------------------------------------
25 void SensorDeviceImpl::EnumerateHMDFromSensorDisplayInfo( const SensorDisplayInfoImpl& displayInfo,
26 DeviceFactory::EnumerateVisitor& visitor)
27 {
29 OSX::HMDDeviceCreateDesc hmdCreateDesc(&OSX::HMDDeviceFactory::Instance, 1, 1, "", 0);
31 hmdCreateDesc.SetScreenParameters( 0, 0,
32 displayInfo.HResolution, displayInfo.VResolution,
33 displayInfo.HScreenSize, displayInfo.VScreenSize);
35 if ((displayInfo.DistortionType & SensorDisplayInfoImpl::Mask_BaseFmt) == SensorDisplayInfoImpl::Base_Distortion)
36 hmdCreateDesc.SetDistortion(displayInfo.DistortionK);
37 if (displayInfo.HScreenSize > 0.14f)
38 hmdCreateDesc.Set7Inch();
40 visitor.Visit(hmdCreateDesc);
41 }
43 } // namespace OVR