diff options
Diffstat (limited to 'indra/newview/llvograss.cpp')
-rw-r--r-- | indra/newview/llvograss.cpp | 56 |
1 files changed, 2 insertions, 54 deletions
diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp index 8a58a9c65b..a82afbeb76 100644 --- a/indra/newview/llvograss.cpp +++ b/indra/newview/llvograss.cpp @@ -53,7 +53,6 @@ #include "llworld.h" #include "lldir.h" #include "llxmltree.h" -#include "llvotree.h" const S32 GRASS_MAX_BLADES = 32; const F32 GRASS_BLADE_BASE = 0.25f; // Width of grass at base @@ -295,23 +294,6 @@ BOOL LLVOGrass::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) return TRUE; } - if(LLVOTree::isTreeRenderingStopped()) //stop rendering grass - { - if(mNumBlades) - { - mNumBlades = 0 ; - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL, TRUE); - } - return TRUE ; - } - else if(!mNumBlades)//restart grass rendering - { - mNumBlades = GRASS_MAX_BLADES ; - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL, TRUE); - - return TRUE ; - } - if (mPatch && (mLastPatchUpdateTime != mPatch->getLastUpdateTime())) { gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, TRUE); @@ -358,20 +340,7 @@ BOOL LLVOGrass::updateLOD() { return FALSE; } - if(LLVOTree::isTreeRenderingStopped()) - { - if(mNumBlades) - { - mNumBlades = 0 ; - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL, TRUE); - } - return TRUE ; - } - if(!mNumBlades) - { - mNumBlades = GRASS_MAX_BLADES; - } - + LLFace* face = mDrawable->getFace(0); F32 tan_angle = 0.f; @@ -418,24 +387,8 @@ static LLFastTimer::DeclareTimer FTM_UPDATE_GRASS("Update Grass"); BOOL LLVOGrass::updateGeometry(LLDrawable *drawable) { LLFastTimer ftm(FTM_UPDATE_GRASS); - dirtySpatialGroup(); - - if(!mNumBlades)//stop rendering grass - { - if (mDrawable->getNumFaces() > 0) - { - LLFace* facep = mDrawable->getFace(0); - if(facep) - { - facep->setSize(0, 0); - } - } - } - else - { - plantBlades(); - } + plantBlades(); return TRUE; } @@ -476,11 +429,6 @@ void LLVOGrass::getGeometry(S32 idx, LLStrider<LLColor4U>& colorsp, LLStrider<U16>& indicesp) { - if(!mNumBlades)//stop rendering grass - { - return ; - } - mPatch = mRegionp->getLand().resolvePatchRegion(getPositionRegion()); if (mPatch) mLastPatchUpdateTime = mPatch->getLastUpdateTime(); |