From 47255bf44d04e5ba7b33d44f8cc738da4be9d53a Mon Sep 17 00:00:00 2001 From: Cosmic Linden Date: Thu, 11 Apr 2024 17:26:02 -0700 Subject: secondlife/viewer#1184: Stop making terrain textures undeletable --- indra/newview/lldrawpoolterrain.cpp | 36 +----------------------------------- 1 file changed, 1 insertion(+), 35 deletions(-) (limited to 'indra/newview/lldrawpoolterrain.cpp') diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp index 2d198c5b4b..c5932a6ad9 100644 --- a/indra/newview/lldrawpoolterrain.cpp +++ b/indra/newview/lldrawpoolterrain.cpp @@ -115,41 +115,7 @@ void LLDrawPoolTerrain::boostTerrainDetailTextures() // Hack! Get the region that this draw pool is rendering from! LLViewerRegion *regionp = mDrawFace[0]->getDrawable()->getVObj()->getRegion(); LLVLComposition *compp = regionp->getComposition(); - for (S32 i = 0; i < 4; i++) - { - constexpr LLGLTexture::EBoostLevel level = LLGLTexture::BOOST_TERRAIN; - constexpr float stats = 1024.f * 1024.f; - - LLPointer& tex = compp->mDetailTextures[i]; - llassert(tex.notNull()); - tex->setBoostLevel(level); - tex->addTextureStats(stats); - - LLPointer& fetched_material = compp->mDetailMaterials[i]; - if (fetched_material) - { - if (fetched_material->mBaseColorTexture) - { - fetched_material->mBaseColorTexture->setBoostLevel(level); - fetched_material->mBaseColorTexture->addTextureStats(stats); - } - if (fetched_material->mNormalTexture) - { - fetched_material->mNormalTexture->setBoostLevel(level); - fetched_material->mNormalTexture->addTextureStats(stats); - } - if (fetched_material->mMetallicRoughnessTexture) - { - fetched_material->mMetallicRoughnessTexture->setBoostLevel(level); - fetched_material->mMetallicRoughnessTexture->addTextureStats(stats); - } - if (fetched_material->mEmissiveTexture) - { - fetched_material->mEmissiveTexture->setBoostLevel(level); - fetched_material->mEmissiveTexture->addTextureStats(stats); - } - } - } + compp->boost(); } void LLDrawPoolTerrain::beginDeferredPass(S32 pass) -- cgit v1.2.3