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
43234323 PerformanceTimer perfTimer("LOD");
43244324 // adjust it unless we were asked to disable this feature, or if we're currently in throttleRendering mode
43254325 if (!isThrottleRendering()) {
4326− float batchTime = (float)_gpuContext->getFrameTimerBatchAverage();
4326+ float presentTime = getActiveDisplayPlugin()->getAveragePresentTime();
43274327 float engineRunTime = (float)(_renderEngine->getConfiguration().get()->getCPURunTime());
4328− DependencyManager::get<LODManager>()->autoAdjustLOD(batchTime, engineRunTime, deltaTime);
4328+ DependencyManager::get<LODManager>()->autoAdjustLOD(presentTime, engineRunTime, deltaTime);
43294329 } else {
43304330 DependencyManager::get<LODManager>()->resetLODAdjust();
43314331 }