aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llvograss.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:04 -0500
committerJacek Antonelli2008-08-15 23:45:04 -0500
commit117e22047c5752352342d64e3fb7ce00a4eb8113 (patch)
treee32de2cfba0dda8705ae528fcd1fbe23ba075685 /linden/indra/newview/llvograss.cpp
parentSecond Life viewer sources 1.18.0.6 (diff)
downloadmeta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.zip
meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.tar.gz
meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.tar.bz2
meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.tar.xz
Second Life viewer sources 1.18.1.2
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