summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorprep <prep@lindenlab.com>2012-07-11 10:47:45 -0400
committerprep <prep@lindenlab.com>2012-07-11 10:47:45 -0400
commitf71d1db58de8646b9cb74e74acb617c397be1db5 (patch)
tree8501e6156e6ed4300a2b8e66bfbd3c2d698012f0 /indra
parent34d95fdc01690fe65ac89136cbc4782a9a22af95 (diff)
MAINT-1253 Rigged meshes in the upload model window now have a material applied instead of white.
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);