aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llvograss.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llvograss.cpp')
-rw-r--r--linden/indra/newview/llvograss.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/linden/indra/newview/llvograss.cpp b/linden/indra/newview/llvograss.cpp
index 5d9c581..4725b33 100644
--- a/linden/indra/newview/llvograss.cpp
+++ b/linden/indra/newview/llvograss.cpp
@@ -336,16 +336,13 @@ void LLVOGrass::setPixelAreaAndAngle(LLAgent &agent)
336// BUG could speed this up by caching the relative_position and range calculations 336// BUG could speed this up by caching the relative_position and range calculations
337void LLVOGrass::updateTextures(LLAgent &agent) 337void LLVOGrass::updateTextures(LLAgent &agent)
338{ 338{
339 F32 texel_area_ratio = 1.f;
340 F32 cos_angle = 1.f;
341
342 if (getTEImage(0)) 339 if (getTEImage(0))
343 { 340 {
344 if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXTURE_AREA)) 341 if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXTURE_AREA))
345 { 342 {
346 setDebugText(llformat("%4.0f", fsqrtf(mPixelArea))); 343 setDebugText(llformat("%4.0f", fsqrtf(mPixelArea)));
347 } 344 }
348 getTEImage(0)->addTextureStats(mPixelArea, texel_area_ratio, cos_angle); 345 getTEImage(0)->addTextureStats(mPixelArea);
349 } 346 }
350} 347}
351 348
@@ -442,7 +439,8 @@ void LLVOGrass::getGeometry(S32 idx,
442 LLStrider<U32>& indicesp) 439 LLStrider<U32>& indicesp)
443{ 440{
444 mPatch = mRegionp->getLand().resolvePatchRegion(getPositionRegion()); 441 mPatch = mRegionp->getLand().resolvePatchRegion(getPositionRegion());
445 mLastPatchUpdateTime = mPatch->getLastUpdateTime(); 442 if (mPatch)
443 mLastPatchUpdateTime = mPatch->getLastUpdateTime();
446 444
447 LLVector3 position; 445 LLVector3 position;
448 // Create random blades of grass with gaussian distribution 446 // Create random blades of grass with gaussian distribution