summaryrefslogtreecommitdiff
path: root/indra/newview/llmodelpreview.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2022-03-25 13:06:21 -0500
committerDave Parks <davep@lindenlab.com>2022-03-25 13:06:21 -0500
commited98d77fe81a04a03c76e159f8fa963adf6b1109 (patch)
tree0ba3f82813f0125cf02471a24ef48816e9baee13 /indra/newview/llmodelpreview.cpp
parent9b2df75c87d8ef06177f1591716cbe913b66de1e (diff)
parentc6da3dfd2f57cba4562f6732b5f1d523cf4f7e11 (diff)
Merge branch 'DRTVWR-546' of ssh://bitbucket.org/lindenlab/viewer into DRTVWR-546
Diffstat (limited to 'indra/newview/llmodelpreview.cpp')
-rw-r--r--indra/newview/llmodelpreview.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/newview/llmodelpreview.cpp b/indra/newview/llmodelpreview.cpp
index b60fabb01b..c7f56de4ed 100644
--- a/indra/newview/llmodelpreview.cpp
+++ b/indra/newview/llmodelpreview.cpp
@@ -3285,6 +3285,14 @@ BOOL LLModelPreview::render()
if (!physics.mMesh.empty())
{ //render hull instead of mesh
+ // SL-16993 physics.mMesh[i].mNormals were being used to light the exploded
+ // analyzed physics shape but the drawArrays() interface changed
+ // causing normal data <0,0,0> to be passed to the shader.
+ // The Phyics Preview shader uses plain vertex coloring so the physics hull is full lit.
+ // We could also use interface/ui shaders.
+ gObjectPreviewProgram.unbind();
+ gPhysicsPreviewProgram.bind();
+
for (U32 i = 0; i < physics.mMesh.size(); ++i)
{
if (explode > 0.f)
@@ -3312,6 +3320,9 @@ BOOL LLModelPreview::render()
gGL.popMatrix();
}
}
+
+ gPhysicsPreviewProgram.unbind();
+ gObjectPreviewProgram.bind();
}
}
}