MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / FrameMove

Method FrameMove

ogsr_engine/xr_3da/device.cpp:473–510  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

471u32 app_inactive_time_start = 0;
472
473void CRenderDevice::FrameMove()
474{
475 ZoneScoped;
476
477 dwFrame++;
478
479 u32 _old_continual = dwTimeContinual;
480 dwTimeContinual = TimerMM.GetElapsed_ms() - app_inactive_time;
481 dwTimeDeltaContinual = dwTimeContinual - _old_continual;
482
483 fTimeDeltaReal = Timer.GetElapsed_sec();
484 fTimeDeltaRealMS = static_cast<float>(Timer.GetElapsed_ms());
485 if (!_valid(fTimeDeltaReal))
486 fTimeDeltaReal = EPS_S + EPS_S;
487 Timer.Start(); // previous frame
488
489 {
490 if (Paused())
491 fTimeDelta = 0.0f;
492 else
493 {
494 fTimeDelta = 0.1f * fTimeDelta + 0.9f * fTimeDeltaReal; // smooth random system activity - worst case ~7% error
495 clamp(fTimeDelta, EPS_S + EPS_S, .1f); // limit to 10fps minimum
496 }
497 fTimeGlobal = TimerGlobal.GetElapsed_sec();
498
499 u32 _old_global = dwTimeGlobal;
500 dwTimeGlobal = TimerGlobal.GetElapsed_ms();
501 dwTimeDelta = dwTimeGlobal - _old_global;
502 }
503
504 // Frame move
505 Statistic->EngineTOTAL.Begin();
506
507 Device.seqFrame.Process(rp_Frame);
508
509 Statistic->EngineTOTAL.End();
510}
511
512ENGINE_API BOOL bShowPauseString = TRUE;
513

Callers

nothing calls this directly

Calls 7

PausedFunction · 0.85
clampFunction · 0.85
_validFunction · 0.50
StartMethod · 0.45
BeginMethod · 0.45
ProcessMethod · 0.45
EndMethod · 0.45

Tested by

no test coverage detected