aboutsummaryrefslogtreecommitdiffstats
path: root/LibOVR/Src/CAPI/CAPI_HMDRenderState.cpp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-03-28 01:43:35 +0100
committerSven Gothel <[email protected]>2015-03-28 01:43:35 +0100
commit4207f9c279e832e3afcb3f5fc6cd8d84cb4cfe4c (patch)
treecf3671058d55b47ab6cb6f36f369928606137628 /LibOVR/Src/CAPI/CAPI_HMDRenderState.cpp
parentc29cd1a2fbff6282bab956ad61661ac9d48c4e6e (diff)
Bump OculusVR RIFT SDK to 0.5.0.1vanilla_0.5.0.1
Diffstat (limited to 'LibOVR/Src/CAPI/CAPI_HMDRenderState.cpp')
-rwxr-xr-x[-rw-r--r--]LibOVR/Src/CAPI/CAPI_HMDRenderState.cpp36
1 files changed, 22 insertions, 14 deletions
diff --git a/LibOVR/Src/CAPI/CAPI_HMDRenderState.cpp b/LibOVR/Src/CAPI/CAPI_HMDRenderState.cpp
index 6630607..a22079d 100644..100755
--- a/LibOVR/Src/CAPI/CAPI_HMDRenderState.cpp
+++ b/LibOVR/Src/CAPI/CAPI_HMDRenderState.cpp
@@ -26,6 +26,7 @@ limitations under the License.
#include "CAPI_HMDRenderState.h"
+
namespace OVR { namespace CAPI {
@@ -38,9 +39,10 @@ ovrHmdDesc HMDRenderState::GetDesc() const
memset(&d, 0, sizeof(d));
d.Type = ovrHmd_Other;
-
+
d.ProductName = OurHMDInfo.ProductName;
d.Manufacturer = OurHMDInfo.Manufacturer;
+
d.Resolution.w = OurHMDInfo.ResolutionInPixels.w;
d.Resolution.h = OurHMDInfo.ResolutionInPixels.h;
d.WindowsPos.x = OurHMDInfo.DesktopX;
@@ -60,9 +62,9 @@ ovrHmdDesc HMDRenderState::GetDesc() const
d.HmdCaps = ovrHmdCap_Present | ovrHmdCap_NoVSync;
d.TrackingCaps = ovrTrackingCap_MagYawCorrection | ovrTrackingCap_Orientation;
- d.DistortionCaps = ovrDistortionCap_Chromatic | ovrDistortionCap_TimeWarp |
- ovrDistortionCap_Vignette | ovrDistortionCap_SRGB |
- ovrDistortionCap_FlipInput | ovrDistortionCap_ProfileNoTimewarpSpinWaits |
+ d.DistortionCaps = ovrDistortionCap_TimeWarp | //ovrDistortionCap_DepthProjectedTimeWarp |
+ ovrDistortionCap_Vignette | ovrDistortionCap_SRGB | ovrDistortionCap_FlipInput |
+ ovrDistortionCap_TimewarpJitDelay | ovrDistortionCap_ProfileNoSpinWaits |
ovrDistortionCap_HqDistortion | ovrDistortionCap_LinuxDevFullscreen;
#if defined(OVR_OS_WIN32) || defined(OVR_OS_WIN64)
@@ -71,20 +73,22 @@ ovrHmdDesc HMDRenderState::GetDesc() const
#endif
if( OurHMDInfo.InCompatibilityMode )
+ {
d.HmdCaps |= ovrHmdCap_ExtendDesktop;
+ }
- if (strstr(OurHMDInfo.ProductName, "DK1"))
+ if (OurHMDInfo.HmdType == HmdType_DK1)
{
d.Type = ovrHmd_DK1;
}
- else if (strstr(OurHMDInfo.ProductName, "DK2"))
+ else if (OurHMDInfo.HmdType == HmdType_DK2)
{
- d.Type = ovrHmd_DK2;
- d.HmdCaps |= ovrHmdCap_LowPersistence | ovrHmdCap_DynamicPrediction;
+ d.Type = ovrHmd_DK2;
+ d.HmdCaps |= ovrHmdCap_LowPersistence | ovrHmdCap_DynamicPrediction;
d.TrackingCaps |= ovrTrackingCap_Position;
- d.DistortionCaps |= ovrDistortionCap_Overdrive;
+ d.DistortionCaps |= ovrDistortionCap_Overdrive;
}
-
+
const DistortionRenderDesc& leftDistortion = Distortion[0];
const DistortionRenderDesc& rightDistortion = Distortion[1];
@@ -108,15 +112,19 @@ ovrHmdDesc HMDRenderState::GetDesc() const
}
// MA: Taking this out on purpose.
- // Important information for those that are required to do their own timing,
+ // Important information for those that are required to do their own timing,
// because of shortfalls in timing code.
- //d.VsyncToNextVsync = OurHMDInfo.Shutter.VsyncToNextVsync;
- //d.PixelPersistence = OurHMDInfo.Shutter.PixelPersistence;
+ //d.VsyncToNextVsync = OurHMDInfo.Shutter.VsyncToNextVsync;
+ //d.PixelPersistence = OurHMDInfo.Shutter.PixelPersistence;
+
+ if (OurHMDInfo.DebugDevice)
+ {
+ d.HmdCaps |= ovrHmdCap_DebugDevice;
+ }
return d;
}
-
ovrSizei HMDRenderState::GetFOVTextureSize(int eye, ovrFovPort fov, float pixelsPerDisplayPixel) const
{
OVR_ASSERT((unsigned)eye < 2);