From 77f56a3f3db72b2938eadb0868fc7be975dabafa Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Fri, 10 Jul 2009 22:02:26 +0000 Subject: merge QAR-1579: texture-cleanup-1. --- indra/newview/lldrawable.cpp | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'indra/newview/lldrawable.cpp') 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* } } -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); } } } -- cgit v1.2.3