summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatermodelpreview.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2012-10-16 16:25:36 -0500
committerDave Parks <davep@lindenlab.com>2012-10-16 16:25:36 -0500
commit12621b9d0604fa56dd3415ee5f62b5312090d2d6 (patch)
treebfd0adf68c01d34bfbfdb2ea9d087bf8f0e53c41 /indra/newview/llfloatermodelpreview.cpp
parentffc33a1cc5b96d9ae6de7f447c09de3ae8174fbc (diff)
parentec125540c4dccc8f1ff64018364a6a2235b9e8d0 (diff)
Automated merge with https://bitbucket.org/lindenlab/viewer-cat
Diffstat (limited to 'indra/newview/llfloatermodelpreview.cpp')
-rwxr-xr-xindra/newview/llfloatermodelpreview.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 449173f9b4..e501fcaa90 100755
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -5087,6 +5087,11 @@ BOOL LLModelPreview::render()
refresh();
}
+ if (use_shaders)
+ {
+ gObjectPreviewProgram.bind();
+ }
+
gGL.loadIdentity();
gPipeline.enableLightsPreview();
@@ -5112,11 +5117,6 @@ BOOL LLModelPreview::render()
const U32 type_mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_NORMAL | LLVertexBuffer::MAP_TEXCOORD0;
- if (use_shaders)
- {
- gObjectPreviewProgram.bind();
- }
-
LLGLEnable normalize(GL_NORMALIZE);
if (!mBaseModel.empty() && mVertexBuffer[5].empty())
@@ -5305,7 +5305,7 @@ BOOL LLModelPreview::render()
hull_colors.push_back(LLColor4U(rand()%128+127, rand()%128+127, rand()%128+127, 128));
}
- glColor4ubv(hull_colors[i].mV);
+ gGL.diffuseColor4ubv(hull_colors[i].mV);
LLVertexBuffer::drawArrays(LLRender::TRIANGLES, physics.mMesh[i].mPositions, physics.mMesh[i].mNormals);
if (explode > 0.f)