summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatermodelpreview.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-08-08 15:39:02 -0500
committerDave Parks <davep@lindenlab.com>2011-08-08 15:39:02 -0500
commitf076bdf609ec1fe114a7d0222a318483c97c7a26 (patch)
tree93dbd2a949d60daaf6aaa025ca7cf036cf90a929 /indra/newview/llfloatermodelpreview.cpp
parentf302e119627090c22325df59c40e1762402a08c6 (diff)
parentb9439ac006ac64179180ec2a47f6bd92468de455 (diff)
merge
Diffstat (limited to 'indra/newview/llfloatermodelpreview.cpp')
-rwxr-xr-xindra/newview/llfloatermodelpreview.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index ef846ec42e..3286408f21 100755
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -4950,7 +4950,8 @@ BOOL LLModelPreview::render()
llassert(binding == model->mMaterialList[i]);
- glColor4fv(material.mDiffuseColor.mV);
+ gGL.diffuseColor4fv(instance.mMaterial[i].mDiffuseColor.mV);
+
if (material.mDiffuseMap.notNull())
{
if (material.mDiffuseMap->getDiscardLevel() > -1)
@@ -4962,12 +4963,12 @@ BOOL LLModelPreview::render()
}
else
{
- glColor4f(1,1,1,1);
+ gGL.diffuseColor4f(1,1,1,1);
}
buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getNumVerts()-1, buffer->getNumIndices(), 0);
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
- glColor3f(0.4f, 0.4f, 0.4f);
+ gGL.diffuseColor3f(0.4f, 0.4f, 0.4f);
if (edges)
{
@@ -5069,11 +5070,11 @@ BOOL LLModelPreview::render()
buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getNumVerts()-1, buffer->getNumIndices(), 0);
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
- glColor4f(0.4f, 0.4f, 0.0f, 0.4f);
+ gGL.diffuseColor4f(0.4f, 0.4f, 0.0f, 0.4f);
buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getNumVerts()-1, buffer->getNumIndices(), 0);
- glColor3f(1.f, 1.f, 0.f);
+ gGL.diffuseColor3f(1.f, 1.f, 0.f);
glLineWidth(2.f);
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
@@ -5093,7 +5094,7 @@ BOOL LLModelPreview::render()
//show degenerate triangles
LLGLDepthTest depth(GL_TRUE, GL_TRUE, GL_ALWAYS);
LLGLDisable cull(GL_CULL_FACE);
- glColor4f(1.f,0.f,0.f,1.f);
+ gGL.diffuseColor4f(1.f,0.f,0.f,1.f);
const LLVector4a scale(0.5f);
for (LLMeshUploadThread::instance_list::iterator iter = mUploadData.begin(); iter != mUploadData.end(); ++iter)
@@ -5258,11 +5259,12 @@ BOOL LLModelPreview::render()
const std::string& binding = instance.mModel->mMaterialList[i];
const LLImportMaterial& material = instance.mMaterial[binding];
+
buffer->setBuffer(type_mask & buffer->getTypeMask());
- glColor4fv(material.mDiffuseColor.mV);
+ gGL.diffuseColor4fv(instance.mMaterial[i].mDiffuseColor.mV);
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
buffer->draw(LLRender::TRIANGLES, buffer->getNumIndices(), 0);
- glColor3f(0.4f, 0.4f, 0.4f);
+ gGL.diffuseColor3f(0.4f, 0.4f, 0.4f);
if (edges)
{