aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:45 -0500
committerJacek Antonelli2008-08-15 23:45:45 -0500
commitb1831d23bfdd0c876ac8cf687d6d3cf02345e28e (patch)
treee977d6563859940ad05af08b7bc150f57a7cb548 /linden/indra/newview/llvovolume.cpp
parentSecond Life viewer sources 1.20.3 (diff)
downloadmeta-impy-b1831d23bfdd0c876ac8cf687d6d3cf02345e28e.zip
meta-impy-b1831d23bfdd0c876ac8cf687d6d3cf02345e28e.tar.gz
meta-impy-b1831d23bfdd0c876ac8cf687d6d3cf02345e28e.tar.bz2
meta-impy-b1831d23bfdd0c876ac8cf687d6d3cf02345e28e.tar.xz
Second Life viewer sources 1.20.4
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llvovolume.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/linden/indra/newview/llvovolume.cpp b/linden/indra/newview/llvovolume.cpp
index 188c277..6b5b9bb 100644
--- a/linden/indra/newview/llvovolume.cpp
+++ b/linden/indra/newview/llvovolume.cpp
@@ -766,9 +766,7 @@ void LLVOVolume::sculpt()
766 766
767 sculpt_height = raw_image->getHeight(); 767 sculpt_height = raw_image->getHeight();
768 sculpt_width = raw_image->getWidth(); 768 sculpt_width = raw_image->getWidth();
769 769 sculpt_components = raw_image->getComponents();
770 sculpt_components = raw_image->getComponents();
771 sculpt_data = raw_image->getData();
772 770
773 if(is_valid) 771 if(is_valid)
774 { 772 {
@@ -776,12 +774,18 @@ void LLVOVolume::sculpt()
776 } 774 }
777 if(!is_valid) 775 if(!is_valid)
778 { 776 {
779 sculpt_width = 0 ; 777 sculpt_width = 0;
780 sculpt_height = 0 ; 778 sculpt_height = 0;
779 sculpt_data = NULL ;
780 }
781 else
782 {
783 if (raw_image->getDataSize() < sculpt_height * sculpt_width * sculpt_components)
784 llerrs << "Sculpt: image data size = " << raw_image->getDataSize()
785 << " < " << sculpt_height << " x " << sculpt_width << " x " <<sculpt_components << llendl;
786
787 sculpt_data = raw_image->getData();
781 } 788 }
782
783 llassert_always(raw_image->getDataSize() >= sculpt_height * sculpt_width * sculpt_components);
784
785 getVolume()->sculpt(sculpt_width, sculpt_height, sculpt_components, sculpt_data, discard_level); 789 getVolume()->sculpt(sculpt_width, sculpt_height, sculpt_components, sculpt_data, discard_level);
786 } 790 }
787} 791}