also, refactor LOD adjust logic
Showing the changes to interface/src/Application.cpp (1 of 3 files). Show all
Unified · Split
| @@ -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 mode | 4324 | // 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 | } |