diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2024-06-11 08:37:03 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2024-06-11 08:37:43 +0300 |
commit | 534605eb228c8b9ab9df0137394f3f55b7f7b022 (patch) | |
tree | caed3347d6780d73ac2b66296552fedc0a9f7938 /indra/newview/llsurface.cpp | |
parent | d1cf13f31e75807500aff0cf49812a76aff2bd74 (diff) | |
parent | a73773bc1abdac6bc3beea36fd4ba58eba686e13 (diff) |
Merge branch 'main' (featurette) into inventory_favorites
Diffstat (limited to 'indra/newview/llsurface.cpp')
-rw-r--r-- | indra/newview/llsurface.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/indra/newview/llsurface.cpp b/indra/newview/llsurface.cpp index 93e1f9c774..55ecc7ccc5 100644 --- a/indra/newview/llsurface.cpp +++ b/indra/newview/llsurface.cpp @@ -643,17 +643,18 @@ void LLSurface::updatePatchVisibilities(LLAgent &agent) } } -BOOL LLSurface::idleUpdate(F32 max_update_time) +template<bool PBR> +bool LLSurface::idleUpdate(F32 max_update_time) { if (!gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_TERRAIN)) { - return FALSE; + return false; } // Perform idle time update of non-critical stuff. // In this case, texture and normal updates. LLTimer update_timer; - BOOL did_update = FALSE; + bool did_update = false; // If the Z height data has changed, we need to rebuild our // property line vertex arrays. @@ -669,13 +670,13 @@ BOOL LLSurface::idleUpdate(F32 max_update_time) { std::set<LLSurfacePatch *>::iterator curiter = iter++; LLSurfacePatch *patchp = *curiter; - patchp->updateNormals(); + patchp->updateNormals<PBR>(); patchp->updateVerticalStats(); if (max_update_time == 0.f || update_timer.getElapsedTimeF32() < max_update_time) { if (patchp->updateTexture()) { - did_update = TRUE; + did_update = true; patchp->clearDirty(); mDirtyPatchList.erase(curiter); } @@ -691,6 +692,9 @@ BOOL LLSurface::idleUpdate(F32 max_update_time) return did_update; } +template bool LLSurface::idleUpdate</*PBR=*/false>(F32 max_update_time); +template bool LLSurface::idleUpdate</*PBR=*/true>(F32 max_update_time); + void LLSurface::decompressDCTPatch(LLBitPack &bitpack, LLGroupHeader *gopp, BOOL b_large_patch) { |