aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
authorthickbrick2011-01-21 15:10:56 +0200
committerthickbrick2011-01-21 15:10:56 +0200
commit4e577785ba1417cd9ef6742a33e818016697b508 (patch)
tree6bb36698e584168bd1f84ac4fb93ac6ef1b32270 /linden/indra/newview/llvovolume.cpp
parentFix #757: Missing Raycasting tool from Advanced menu (diff)
downloadmeta-impy-4e577785ba1417cd9ef6742a33e818016697b508.zip
meta-impy-4e577785ba1417cd9ef6742a33e818016697b508.tar.gz
meta-impy-4e577785ba1417cd9ef6742a33e818016697b508.tar.bz2
meta-impy-4e577785ba1417cd9ef6742a33e818016697b508.tar.xz
Partial fix #772: Large sculpt maps are deformed
This is a partial fix for cases where the sculpt map is larger than 128x128, like in some old sculpted trees. This was done by content creators to beat bugs in old viewers. The sculpties still need a lod change to trigger a rebuild once they are fully decoded, and that doesn't always happen, because we abuse RenderVolumeLODFactor. Ported from Snowglobe2 (GPL)
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llvovolume.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/linden/indra/newview/llvovolume.cpp b/linden/indra/newview/llvovolume.cpp
index 73ff860..632bca2 100644
--- a/linden/indra/newview/llvovolume.cpp
+++ b/linden/indra/newview/llvovolume.cpp
@@ -527,8 +527,8 @@ void LLVOVolume::updateTextureVirtualSize()
527 } 527 }
528 } 528 }
529 529
530 S32 texture_discard = mSculptTexture->getCachedRawImageLevel(); //try to match the texture 530 S32 texture_discard = mSculptTexture->getDiscardLevel(); //try to match the texture
531 S32 current_discard = mSculptLevel; 531 S32 current_discard = getVolume() ? getVolume()->getSculptLevel() : -2 ;
532 532
533 if (texture_discard >= 0 && //texture has some data available 533 if (texture_discard >= 0 && //texture has some data available
534 (texture_discard < current_discard || //texture has more data than last rebuild 534 (texture_discard < current_discard || //texture has more data than last rebuild
@@ -711,7 +711,7 @@ void LLVOVolume::sculpt()
711 S8 sculpt_components = 0; 711 S8 sculpt_components = 0;
712 const U8* sculpt_data = NULL; 712 const U8* sculpt_data = NULL;
713 713
714 S32 discard_level = mSculptTexture->getCachedRawImageLevel() ; 714 S32 discard_level = mSculptTexture->getDiscardLevel();
715 LLImageRaw* raw_image = mSculptTexture->getCachedRawImage() ; 715 LLImageRaw* raw_image = mSculptTexture->getCachedRawImage() ;
716 716
717 S32 max_discard = mSculptTexture->getMaxDiscardLevel(); 717 S32 max_discard = mSculptTexture->getMaxDiscardLevel();