summaryrefslogtreecommitdiff
path: root/indra/newview/llvograss.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2008-04-01 17:45:04 +0000
committerSteven Bennetts <steve@lindenlab.com>2008-04-01 17:45:04 +0000
commit941cb9f4124c9ccfd5c845bc94639fa46df12c3d (patch)
treee0f525e7bd6cc76d89b2df69c6f1554d191561e8 /indra/newview/llvograss.cpp
parentecec626dec93524f7ef5831a5ba344d6449b99bc (diff)
merge release@83343 skinning-1-merge@83714 -> release
QAR-424
Diffstat (limited to 'indra/newview/llvograss.cpp')
-rw-r--r--indra/newview/llvograss.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp
index 833fe4b464..54dabe5615 100644
--- a/indra/newview/llvograss.cpp
+++ b/indra/newview/llvograss.cpp
@@ -176,7 +176,8 @@ void LLVOGrass::initClass()
static LLStdStringHandle texture_name_string = LLXmlTree::addAttributeString("texture_name");
success &= grass_def->getFastAttributeString(texture_name_string, textureName);
- newGrass->mTextureID.set( gViewerArt.getString(textureName) );
+ LLViewerImage* grass_image = gImageList.getImageFromFile(textureName);
+ newGrass->mTextureID = grass_image->getID();
}
static LLStdStringHandle blade_sizex_string = LLXmlTree::addAttributeString("blade_size_x");
@@ -330,7 +331,7 @@ void LLVOGrass::setPixelAreaAndAngle(LLAgent &agent)
mAppAngle = (F32) atan2( max_scale, range) * RAD_TO_DEG;
// Compute pixels per meter at the given range
- F32 pixels_per_meter = gCamera->getViewHeightInPixels() / (tan(gCamera->getView()) * range);
+ F32 pixels_per_meter = LLViewerCamera::getInstance()->getViewHeightInPixels() / (tan(LLViewerCamera::getInstance()->getView()) * range);
// Assume grass texture is a 5 meter by 5 meter sprite at the grass object's center
mPixelArea = (pixels_per_meter) * (pixels_per_meter) * 25.f;
@@ -430,7 +431,7 @@ void LLVOGrass::plantBlades()
face->setTEOffset(0);
face->mCenterLocal = mPosition + mRegionp->getOriginAgent();
- mDepth = (face->mCenterLocal - gCamera->getOrigin())*gCamera->getAtAxis();
+ mDepth = (face->mCenterLocal - LLViewerCamera::getInstance()->getOrigin())*LLViewerCamera::getInstance()->getAtAxis();
mDrawable->setPosition(face->mCenterLocal);
mDrawable->movePartition();
LLPipeline::sCompiles++;