Bike-X  0.8
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
OVR::CAPI::FrameTimeManager Class Reference

#include "CAPI_FrameTimeManager.h"

Collaboration diagram for OVR::CAPI::FrameTimeManager:
Collaboration graph

Data Structures

struct  Timing
 
struct  TimingInputs
 

Public Member Functions

 FrameTimeManager (bool vsyncEnabled=true)
 
void Init (HmdRenderInfo &renderInfo)
 
void ResetFrameTiming (unsigned frameIndex, bool dynamicPrediction, bool sdkRender)
 
void SetVsync (bool enabled)
 
double BeginFrame (unsigned frameIndex)
 
void EndFrame ()
 
Timing GetFrameTiming (unsigned frameIndex)
 
double GetEyePredictionTime (ovrEyeType eye)
 
Transformf GetEyePredictionPose (ovrHmd hmd, ovrEyeType eye)
 
void GetTimewarpPredictions (ovrEyeType eye, double timewarpStartEnd[2])
 
void GetTimewarpMatrices (ovrHmd hmd, ovrEyeType eye, ovrPosef renderPose, ovrMatrix4f twmOut[2])
 
bool NeedDistortionTimeMeasurement () const
 
void AddDistortionTimeMeasurement (double distortionTimeSeconds)
 
unsigned char GetFrameLatencyTestDrawColor ()
 
void UpdateFrameLatencyTrackingAfterEndFrame (unsigned char frameLatencyTestColor, const Util::FrameTimeRecordSet &rs)
 
void GetLatencyTimings (float latencies[3])
 
const TimingGetFrameTiming () const
 

Private Member Functions

double calcFrameDelta () const
 
double calcScreenDelay () const
 
double calcTimewarpWaitDelta () const
 

Private Attributes

HmdRenderInfo RenderInfo
 
TimeDeltaCollector FrameTimeDeltas
 
TimeDeltaCollector DistortionRenderTimes
 
FrameLatencyTracker ScreenLatencyTracker
 
bool VsyncEnabled
 
bool DynamicPrediction
 
bool SdkRender
 
double VSyncToScanoutDelay
 
double NoVSyncToScanoutDelay
 
double ScreenSwitchingDelay
 
Timing FrameTiming
 
LocklessUpdater< TimingLocklessTiming
 
double RenderIMUTimeSeconds
 
double TimewarpIMUTimeSeconds
 

Detailed Description

Definition at line 130 of file CAPI_FrameTimeManager.h.

Constructor & Destructor Documentation

OVR::CAPI::FrameTimeManager::FrameTimeManager ( bool  vsyncEnabled = true)

Definition at line 212 of file CAPI_FrameTimeManager.cpp.

Member Function Documentation

void OVR::CAPI::FrameTimeManager::AddDistortionTimeMeasurement ( double  distortionTimeSeconds)

Definition at line 585 of file CAPI_FrameTimeManager.cpp.

double OVR::CAPI::FrameTimeManager::BeginFrame ( unsigned  frameIndex)

Definition at line 405 of file CAPI_FrameTimeManager.cpp.

double OVR::CAPI::FrameTimeManager::calcFrameDelta ( ) const
private

Definition at line 257 of file CAPI_FrameTimeManager.cpp.

double OVR::CAPI::FrameTimeManager::calcScreenDelay ( ) const
private

Definition at line 282 of file CAPI_FrameTimeManager.cpp.

double OVR::CAPI::FrameTimeManager::calcTimewarpWaitDelta ( ) const
private

Definition at line 309 of file CAPI_FrameTimeManager.cpp.

void OVR::CAPI::FrameTimeManager::EndFrame ( )

Definition at line 422 of file CAPI_FrameTimeManager.cpp.

Transformf OVR::CAPI::FrameTimeManager::GetEyePredictionPose ( ovrHmd  hmd,
ovrEyeType  eye 
)

Definition at line 478 of file CAPI_FrameTimeManager.cpp.

double OVR::CAPI::FrameTimeManager::GetEyePredictionTime ( ovrEyeType  eye)

Definition at line 467 of file CAPI_FrameTimeManager.cpp.

unsigned char OVR::CAPI::FrameTimeManager::GetFrameLatencyTestDrawColor ( )
inline

Definition at line 208 of file CAPI_FrameTimeManager.h.

FrameTimeManager::Timing OVR::CAPI::FrameTimeManager::GetFrameTiming ( unsigned  frameIndex)

Definition at line 440 of file CAPI_FrameTimeManager.cpp.

const Timing& OVR::CAPI::FrameTimeManager::GetFrameTiming ( ) const
inline

Definition at line 220 of file CAPI_FrameTimeManager.h.

void OVR::CAPI::FrameTimeManager::GetLatencyTimings ( float  latencies[3])
inline

Definition at line 216 of file CAPI_FrameTimeManager.h.

void OVR::CAPI::FrameTimeManager::GetTimewarpMatrices ( ovrHmd  hmd,
ovrEyeType  eye,
ovrPosef  renderPose,
ovrMatrix4f  twmOut[2] 
)

Definition at line 513 of file CAPI_FrameTimeManager.cpp.

void OVR::CAPI::FrameTimeManager::GetTimewarpPredictions ( ovrEyeType  eye,
double  timewarpStartEnd[2] 
)

Definition at line 493 of file CAPI_FrameTimeManager.cpp.

void OVR::CAPI::FrameTimeManager::Init ( HmdRenderInfo renderInfo)

Definition at line 225 of file CAPI_FrameTimeManager.cpp.

bool OVR::CAPI::FrameTimeManager::NeedDistortionTimeMeasurement ( ) const

Definition at line 577 of file CAPI_FrameTimeManager.cpp.

void OVR::CAPI::FrameTimeManager::ResetFrameTiming ( unsigned  frameIndex,
bool  dynamicPrediction,
bool  sdkRender 
)

Definition at line 235 of file CAPI_FrameTimeManager.cpp.

void OVR::CAPI::FrameTimeManager::SetVsync ( bool  enabled)
inline

Definition at line 184 of file CAPI_FrameTimeManager.h.

void OVR::CAPI::FrameTimeManager::UpdateFrameLatencyTrackingAfterEndFrame ( unsigned char  frameLatencyTestColor,
const Util::FrameTimeRecordSet rs 
)

Definition at line 599 of file CAPI_FrameTimeManager.cpp.

Field Documentation

TimeDeltaCollector OVR::CAPI::FrameTimeManager::DistortionRenderTimes
private

Definition at line 232 of file CAPI_FrameTimeManager.h.

bool OVR::CAPI::FrameTimeManager::DynamicPrediction
private

Definition at line 238 of file CAPI_FrameTimeManager.h.

TimeDeltaCollector OVR::CAPI::FrameTimeManager::FrameTimeDeltas
private

Definition at line 231 of file CAPI_FrameTimeManager.h.

Timing OVR::CAPI::FrameTimeManager::FrameTiming
private

Definition at line 249 of file CAPI_FrameTimeManager.h.

LocklessUpdater<Timing> OVR::CAPI::FrameTimeManager::LocklessTiming
private

Definition at line 251 of file CAPI_FrameTimeManager.h.

double OVR::CAPI::FrameTimeManager::NoVSyncToScanoutDelay
private

Definition at line 245 of file CAPI_FrameTimeManager.h.

double OVR::CAPI::FrameTimeManager::RenderIMUTimeSeconds
private

Definition at line 255 of file CAPI_FrameTimeManager.h.

HmdRenderInfo OVR::CAPI::FrameTimeManager::RenderInfo
private

Definition at line 229 of file CAPI_FrameTimeManager.h.

FrameLatencyTracker OVR::CAPI::FrameTimeManager::ScreenLatencyTracker
private

Definition at line 233 of file CAPI_FrameTimeManager.h.

double OVR::CAPI::FrameTimeManager::ScreenSwitchingDelay
private

Definition at line 246 of file CAPI_FrameTimeManager.h.

bool OVR::CAPI::FrameTimeManager::SdkRender
private

Definition at line 240 of file CAPI_FrameTimeManager.h.

double OVR::CAPI::FrameTimeManager::TimewarpIMUTimeSeconds
private

Definition at line 256 of file CAPI_FrameTimeManager.h.

bool OVR::CAPI::FrameTimeManager::VsyncEnabled
private

Definition at line 236 of file CAPI_FrameTimeManager.h.

double OVR::CAPI::FrameTimeManager::VSyncToScanoutDelay
private

Definition at line 244 of file CAPI_FrameTimeManager.h.


The documentation for this class was generated from the following files: