diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2020-04-21 13:12:05 +0300 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2020-04-21 13:12:05 +0300 |
commit | a4b1c0330a6a8e43bf4c41c5b0c836bd1dee2268 (patch) | |
tree | 6d68d3e3f665d60fa946bd24a4b324b5e63339fb /indra/newview/llvograss.cpp | |
parent | a8df6762ff88458916397b9707f6954b2714e14d (diff) | |
parent | d7f1c88c35849e56f5b352f13c16a08467d1533b (diff) |
Merge branch 'master' into DRTVWR-482
# Conflicts:
# indra/newview/app_settings/shaders/class1/objects/previewV.glsl
# indra/newview/lldynamictexture.cpp
# indra/newview/llfloatermodelpreview.cpp
Diffstat (limited to 'indra/newview/llvograss.cpp')
-rw-r--r-- | indra/newview/llvograss.cpp | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp index d651d540b9..345e87eea8 100644 --- a/indra/newview/llvograss.cpp +++ b/indra/newview/llvograss.cpp @@ -288,24 +288,12 @@ void LLVOGrass::idleUpdate(LLAgent &agent, const F64 &time) // So drones work. return; } - - if(LLVOTree::isTreeRenderingStopped()) //stop rendering grass + if (!LLVOTree::isTreeRenderingStopped() && !mNumBlades)//restart grass rendering { - if(mNumBlades) - { - mNumBlades = 0 ; - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL, TRUE); - } - return; - } - else if(!mNumBlades)//restart grass rendering - { - mNumBlades = GRASS_MAX_BLADES ; + 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 +340,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 +358,6 @@ BOOL LLVOGrass::updateLOD() mNumBlades = GRASS_MAX_BLADES; } - LLFace* face = mDrawable->getFace(0); - F32 tan_angle = 0.f; S32 num_blades = 0; |