summaryrefslogtreecommitdiff
path: root/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2009-12-01 08:51:32 -0800
committerJames Cook <james@lindenlab.com>2009-12-01 08:51:32 -0800
commit5e11affddb1b8816f57f9314381486c00033e080 (patch)
treeb21e2486be2daaa9b249588ce7d88f0f9f472814 /indra/newview/llvovolume.cpp
parent677938e6531209ca9ccd29146454af67f1c743c7 (diff)
parentbf34e572e7acd0f80d103318b76b4abe32c802d3 (diff)
merge
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r--indra/newview/llvovolume.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 48bd387022..1ee0811ba6 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -622,6 +622,7 @@ void LLVOVolume::updateTextureVirtualSize()
const S32 num_faces = mDrawable->getNumFaces();
F32 min_vsize=999999999.f, max_vsize=0.f;
+ LLViewerCamera* camera = LLViewerCamera::getInstance();
for (S32 i = 0; i < num_faces; i++)
{
LLFace* face = mDrawable->getFace(i);
@@ -638,7 +639,7 @@ void LLVOVolume::updateTextureVirtualSize()
if (isHUDAttachment())
{
- F32 area = (F32) LLViewerCamera::getInstance()->getScreenPixelArea();
+ F32 area = (F32) camera->getScreenPixelArea();
vsize = area;
imagep->setBoostLevel(LLViewerTexture::BOOST_HUD);
face->setPixelArea(area); // treat as full screen
@@ -704,9 +705,9 @@ void LLVOVolume::updateTextureVirtualSize()
//if the sculpty very close to the view point, load first
{
- LLVector3 lookAt = getPositionAgent() - LLViewerCamera::getInstance()->getOrigin();
+ LLVector3 lookAt = getPositionAgent() - camera->getOrigin();
F32 dist = lookAt.normVec() ;
- F32 cos_angle_to_view_dir = lookAt * LLViewerCamera::getInstance()->getXAxis() ;
+ F32 cos_angle_to_view_dir = lookAt * camera->getXAxis() ;
mSculptTexture->setAdditionalDecodePriority(0.8f * LLFace::calcImportanceToCamera(cos_angle_to_view_dir, dist)) ;
}
}
@@ -741,7 +742,7 @@ void LLVOVolume::updateTextureVirtualSize()
F32 rad = getLightRadius();
mLightTexture->addTextureStats(gPipeline.calcPixelArea(getPositionAgent(),
LLVector3(rad,rad,rad),
- *LLViewerCamera::getInstance()));
+ *camera));
}
}