History

Merge pull request #12157 from AndrewMeadows/lod-debug-ui

add scripted/qml debug UI for render LOD

Sam Gateau committed 8 years ago

Commit aec99db2 parents 4485ed8 2c431387 files · +334 −28Browse files

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

Unified · Split

interface/src/Application.cpp+3−2
@@ -4356,8 +4356,9 @@ void Application::updateLOD(float deltaTime) const { · 4355 unmodified lines
43564356 float presentTime = getActiveDisplayPlugin()->getAveragePresentTime();
43574357 float engineRunTime = (float)(_renderEngine->getConfiguration().get()->getCPURunTime());
43584358 float gpuTime = getGPUContext()->getFrameTimerGPUAverage();
4359− float maxRenderTime = glm::max(gpuTime, glm::max(presentTime, engineRunTime));
4360− DependencyManager::get<LODManager>()->autoAdjustLOD(maxRenderTime, deltaTime);
4359+ auto lodManager = DependencyManager::get<LODManager>();
4360+ lodManager->setRenderTimes(presentTime, engineRunTime, gpuTime);
4361+ lodManager->autoAdjustLOD(deltaTime);
43614362 } else {
43624363 DependencyManager::get<LODManager>()->resetLODAdjust();
43634364 }