summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2012-07-12 08:56:41 -0400
committerOz Linden <oz@lindenlab.com>2012-07-12 08:56:41 -0400
commitd1ef0dab08a9ff9a4606c3333d289b11a986d673 (patch)
treeef4410eda3ade9687b8a1d2d3680ae5ca6f57f93 /indra
parentcff01d2c5117434693d187ed558d1010d1d6a105 (diff)
parentf71d1db58de8646b9cb74e74acb617c397be1db5 (diff)
merge MAINT-1253 fix
Diffstat (limited to 'indra')
-rwxr-xr-xindra/newview/llfloatermodelpreview.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index e8cf7d1ba4..489f0eca9b 100755
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -5531,6 +5531,15 @@ BOOL LLModelPreview::render()
buffer->setBuffer(type_mask & buffer->getTypeMask());
gGL.diffuseColor4fv(material.mDiffuseColor.mV);
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
+ if (material.mDiffuseMap.notNull())
+ {
+ if (material.mDiffuseMap->getDiscardLevel() > -1)
+ {
+ gGL.getTexUnit(0)->bind(material.mDiffuseMap, true);
+ mTextureSet.insert(material.mDiffuseMap.get());
+ }
+ }
+
buffer->draw(LLRender::TRIANGLES, buffer->getNumIndices(), 0);
gGL.diffuseColor3f(0.4f, 0.4f, 0.4f);