History

use full 'present' time for FPS calculation

also, refactor LOD adjust logic

Andrew Meadows committed 8 years ago

Commit 8e0d3671 parent 5c84c5f3 files · +67 −166Browse files

Showing the changes to interface/src/Application.cpp (1 of 3 files). Show all

Unified · Split

interface/src/Application.cpp+2−2
@@ -4323,9 +4323,9 @@ void Application::updateLOD(float deltaTime) const { · 4322 unmodified lines
4323 PerformanceTimer perfTimer("LOD");4323 PerformanceTimer perfTimer("LOD");
4324 // adjust it unless we were asked to disable this feature, or if we're currently in throttleRendering mode4324 // adjust it unless we were asked to disable this feature, or if we're currently in throttleRendering mode
4325 if (!isThrottleRendering()) {4325 if (!isThrottleRendering()) {
4326 float batchTime = (float)_gpuContext->getFrameTimerBatchAverage();4326 float presentTime = getActiveDisplayPlugin()->getAveragePresentTime();
4327 float engineRunTime = (float)(_renderEngine->getConfiguration().get()->getCPURunTime());4327 float engineRunTime = (float)(_renderEngine->getConfiguration().get()->getCPURunTime());
4328 DependencyManager::get<LODManager>()->autoAdjustLOD(batchTime, engineRunTime, deltaTime);4328 DependencyManager::get<LODManager>()->autoAdjustLOD(presentTime, engineRunTime, deltaTime);
4329 } else {4329 } else {
4330 DependencyManager::get<LODManager>()->resetLODAdjust();4330 DependencyManager::get<LODManager>()->resetLODAdjust();
4331 }4331 }