From 5b072b030b92dd203496ff69d861833e7de25df8 Mon Sep 17 00:00:00 2001 From: Siana Gearz Date: Sun, 17 Jul 2011 21:29:48 +0200 Subject: [PATCH] Area computation fudging --- indra/newview/llvovolume.cpp | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index a7c797f51..b564318ec 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -526,24 +526,29 @@ void LLVOVolume::updateTextureVirtualSize() vsize = face->getTextureVirtualSize(); if (isAttachment()) { - // Rez attachments faster and at full details ! if (permYouOwner()) { - // Our attachments must really rez fast and fully: - // we shouldn't have to zoom on them to get the textures - // fully loaded ! - imagep->setBoostLevel(LLViewerTexture::BOOST_HUD); - imagep->dontDiscard(); + imagep->setBoostLevel(LLViewerTexture::BOOST_HIGH); } } } mPixelArea = llmax(mPixelArea, face->getPixelArea()); - + if (face->mTextureMatrix != NULL) { + // Animating textures also rez badly in Snowglobe because the + // actual displayed area is only a fraction (corresponding to one + // frame) of the animating texture. Let's fix that here: + if (mTextureAnimp && mTextureAnimp->mScaleS > 0.0f && mTextureAnimp->mScaleT > 0.0f) + { + // Adjust to take into account the actual frame size which is only a + // portion of the animating texture + vsize = vsize / mTextureAnimp->mScaleS / mTextureAnimp->mScaleT; + } + if ((vsize < MIN_TEX_ANIM_SIZE && old_size > MIN_TEX_ANIM_SIZE) || - (vsize > MIN_TEX_ANIM_SIZE && old_size < MIN_TEX_ANIM_SIZE)) + (vsize > MIN_TEX_ANIM_SIZE && old_size < MIN_TEX_ANIM_SIZE)) { gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_TCOORD, FALSE); }