summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawable.cpp
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2009-07-10 22:02:26 +0000
committerXiaohong Bao <bao@lindenlab.com>2009-07-10 22:02:26 +0000
commit77f56a3f3db72b2938eadb0868fc7be975dabafa (patch)
treeeb220e9890d0208969746a3e86fecf84b19e436b /indra/newview/lldrawable.cpp
parente4dc104e3296319476bb0d6c327d6a326c967976 (diff)
merge QAR-1579: texture-cleanup-1.
Diffstat (limited to 'indra/newview/lldrawable.cpp')
-rw-r--r--indra/newview/lldrawable.cpp24
1 files changed, 10 insertions, 14 deletions
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index 9f4afc9f17..d8bd32382f 100644
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -229,7 +229,7 @@ S32 LLDrawable::findReferences(LLDrawable *drawablep)
return count;
}
-LLFace* LLDrawable::addFace(LLFacePool *poolp, LLViewerImage *texturep)
+LLFace* LLDrawable::addFace(LLFacePool *poolp, LLViewerTexture *texturep)
{
LLMemType mt(LLMemType::MTYPE_DRAWABLE);
@@ -253,7 +253,7 @@ LLFace* LLDrawable::addFace(LLFacePool *poolp, LLViewerImage *texturep)
return face;
}
-LLFace* LLDrawable::addFace(const LLTextureEntry *te, LLViewerImage *texturep)
+LLFace* LLDrawable::addFace(const LLTextureEntry *te, LLViewerTexture *texturep)
{
LLMemType mt(LLMemType::MTYPE_DRAWABLE);
@@ -275,7 +275,7 @@ LLFace* LLDrawable::addFace(const LLTextureEntry *te, LLViewerImage *texturep)
}
-void LLDrawable::setNumFaces(const S32 newFaces, LLFacePool *poolp, LLViewerImage *texturep)
+void LLDrawable::setNumFaces(const S32 newFaces, LLFacePool *poolp, LLViewerTexture *texturep)
{
if (newFaces == (S32)mFaces.size())
{
@@ -298,7 +298,7 @@ void LLDrawable::setNumFaces(const S32 newFaces, LLFacePool *poolp, LLViewerImag
llassert_always(mFaces.size() == newFaces);
}
-void LLDrawable::setNumFacesFast(const S32 newFaces, LLFacePool *poolp, LLViewerImage *texturep)
+void LLDrawable::setNumFacesFast(const S32 newFaces, LLFacePool *poolp, LLViewerTexture *texturep)
{
if (newFaces <= (S32)mFaces.size() && newFaces >= (S32)mFaces.size()/2)
{
@@ -673,7 +673,7 @@ BOOL LLDrawable::updateMoveDamped()
return done_moving;
}
-void LLDrawable::updateDistance(LLCamera& camera)
+void LLDrawable::updateDistance(LLCamera& camera, bool force_update)
{
//switch LOD with the spatial group to avoid artifacts
//LLSpatialGroup* sg = getSpatialGroup();
@@ -695,7 +695,7 @@ void LLDrawable::updateDistance(LLCamera& camera)
for (S32 i = 0; i < getNumFaces(); i++)
{
LLFace* facep = getFace(i);
- if (facep->getPoolType() == LLDrawPool::POOL_ALPHA)
+ if (force_update || facep->getPoolType() == LLDrawPool::POOL_ALPHA)
{
LLVector3 box = (facep->mExtents[1] - facep->mExtents[0]) * 0.25f;
LLVector3 v = (facep->mCenterLocal-camera.getOrigin());
@@ -736,11 +736,7 @@ void LLDrawable::updateTexture()
if (getVOVolume())
{
- if (!isActive())
- {
- //gPipeline.markMoved(this);
- }
- else
+ if (isActive())
{
if (isRoot())
{
@@ -1273,7 +1269,7 @@ void LLSpatialBridge::setVisible(LLCamera& camera_in, std::vector<LLDrawable*>*
}
}
-void LLSpatialBridge::updateDistance(LLCamera& camera_in)
+void LLSpatialBridge::updateDistance(LLCamera& camera_in, bool force_update)
{
if (mDrawable == NULL)
{
@@ -1283,7 +1279,7 @@ void LLSpatialBridge::updateDistance(LLCamera& camera_in)
LLCamera camera = transformCamera(camera_in);
- mDrawable->updateDistance(camera);
+ mDrawable->updateDistance(camera, force_update);
if (mDrawable->getVObj())
{
@@ -1300,7 +1296,7 @@ void LLSpatialBridge::updateDistance(LLCamera& camera_in)
if (!drawable->isAvatar())
{
- drawable->updateDistance(camera);
+ drawable->updateDistance(camera, force_update);
}
}
}