From b3466243073c2693be4c32b3586a191c30095d01 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Mon, 22 Jul 2019 15:44:35 -0700 Subject: SL-10761 Make vograss objects set their face vert/index counts to 0 when setting the number of blades to 0 to disable rendering so we don't allocate space and then skip setting it up with actual index data in getGeometry. --- indra/newview/llvograss.cpp | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) (limited to 'indra/newview/llvograss.cpp') diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp index d651d540b9..f4a5d60f7c 100644 --- a/indra/newview/llvograss.cpp +++ b/indra/newview/llvograss.cpp @@ -289,23 +289,6 @@ void LLVOGrass::idleUpdate(LLAgent &agent, const F64 &time) return; } - if(LLVOTree::isTreeRenderingStopped()) //stop rendering grass - { - if(mNumBlades) - { - mNumBlades = 0 ; - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL, TRUE); - } - return; - } - else if(!mNumBlades)//restart grass rendering - { - mNumBlades = GRASS_MAX_BLADES ; - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL, TRUE); - - return; - } - if (mPatch && (mLastPatchUpdateTime != mPatch->getLastUpdateTime())) { gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, TRUE); @@ -352,11 +335,15 @@ BOOL LLVOGrass::updateLOD() { return FALSE; } + + LLFace* face = mDrawable->getFace(0); + if(LLVOTree::isTreeRenderingStopped()) { if(mNumBlades) { mNumBlades = 0 ; + face->setSize(0, 0); gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL, TRUE); } return TRUE ; @@ -366,8 +353,6 @@ BOOL LLVOGrass::updateLOD() mNumBlades = GRASS_MAX_BLADES; } - LLFace* face = mDrawable->getFace(0); - F32 tan_angle = 0.f; S32 num_blades = 0; -- cgit v1.2.3 From 6340d2eb3aedb42153fc63a430382f40abed87c1 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 23 Oct 2019 13:11:12 +0300 Subject: SL-11937 FIXED [EEP] Grass doesn't appear after changing the 'Render Settings' from low to any other value --- indra/newview/llvograss.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/newview/llvograss.cpp') diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp index f4a5d60f7c..97543a99f6 100644 --- a/indra/newview/llvograss.cpp +++ b/indra/newview/llvograss.cpp @@ -288,7 +288,12 @@ void LLVOGrass::idleUpdate(LLAgent &agent, const F64 &time) // So drones work. return; } - + if (!LLVOTree::isTreeRenderingStopped() && !mNumBlades)//restart grass rendering + { + mNumBlades = GRASS_MAX_BLADES; + gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL, TRUE); + return; + } if (mPatch && (mLastPatchUpdateTime != mPatch->getLastUpdateTime())) { gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, TRUE); -- cgit v1.2.3 From 3c1e1eab86ab4e7eefd3c1f094a0091137209bc2 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 25 Oct 2019 14:37:18 +0300 Subject: Line endings fix --- indra/newview/llvograss.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'indra/newview/llvograss.cpp') diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp index 97543a99f6..345e87eea8 100644 --- a/indra/newview/llvograss.cpp +++ b/indra/newview/llvograss.cpp @@ -288,11 +288,11 @@ void LLVOGrass::idleUpdate(LLAgent &agent, const F64 &time) // So drones work. return; } - if (!LLVOTree::isTreeRenderingStopped() && !mNumBlades)//restart grass rendering - { - mNumBlades = GRASS_MAX_BLADES; - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL, TRUE); - return; + if (!LLVOTree::isTreeRenderingStopped() && !mNumBlades)//restart grass rendering + { + mNumBlades = GRASS_MAX_BLADES; + gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL, TRUE); + return; } if (mPatch && (mLastPatchUpdateTime != mPatch->getLastUpdateTime())) { -- cgit v1.2.3