summaryrefslogtreecommitdiff
path: root/indra/newview/llmodelpreview.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2024-10-15 16:03:08 -0400
committerNat Goodspeed <nat@lindenlab.com>2024-10-15 16:03:08 -0400
commit64ecc38c841ae0cb0c3d0ccb9b1bf543ecf4230e (patch)
tree24a954501d239ecaa43fe17f6f931e720383c6c2 /indra/newview/llmodelpreview.cpp
parenta2ae46ef3a0036a6030ccc1e3ef4fcdfb7f455f3 (diff)
parentcd712960f316496b29c53dce390dd778ad9d27f4 (diff)
Merge branch 'develop' into maxim/lua-nearby-avatars
Diffstat (limited to 'indra/newview/llmodelpreview.cpp')
-rw-r--r--indra/newview/llmodelpreview.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/indra/newview/llmodelpreview.cpp b/indra/newview/llmodelpreview.cpp
index 1e8b7d39cc..1e7da126b0 100644
--- a/indra/newview/llmodelpreview.cpp
+++ b/indra/newview/llmodelpreview.cpp
@@ -3365,7 +3365,7 @@ bool LLModelPreview::render()
mFMP->childSetEnabled("upload_joints", upload_skin);
}
- F32 explode = (F32)mFMP->childGetValue("physics_explode").asReal();
+ F32 physics_explode = (F32)mFMP->childGetValue("physics_explode").asReal();
LLGLDepthTest gls_depth(GL_TRUE); // SL-12781 re-enable z-buffer for 3D model preview
@@ -3590,12 +3590,12 @@ bool LLModelPreview::render()
for (U32 i = 0; i < physics.mMesh.size(); ++i)
{
- if (explode > 0.f)
+ if (physics_explode > 0.f)
{
gGL.pushMatrix();
LLVector3 offset = model->mHullCenter[i] - model->mCenterOfHullCenters;
- offset *= explode;
+ offset *= physics_explode;
gGL.translatef(offset.mV[0], offset.mV[1], offset.mV[2]);
}
@@ -3610,7 +3610,7 @@ bool LLModelPreview::render()
gGL.diffuseColor4ubv(hull_colors[i].mV);
LLVertexBuffer::drawArrays(LLRender::TRIANGLES, physics.mMesh[i].mPositions);
- if (explode > 0.f)
+ if (physics_explode > 0.f)
{
gGL.popMatrix();
}
@@ -3625,7 +3625,8 @@ bool LLModelPreview::render()
if (render_mesh)
{
auto num_models = mVertexBuffer[LLModel::LOD_PHYSICS][model].size();
- if (pass > 0){
+ if (pass > 0)
+ {
for (size_t i = 0; i < num_models; ++i)
{
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
@@ -3805,7 +3806,8 @@ bool LLModelPreview::render()
}
}
- for (U32 i = 0, e = static_cast<U32>(mVertexBuffer[mPreviewLOD][model].size()); i < e; ++i)
+ std::size_t size = mVertexBuffer[mPreviewLOD][model].size();
+ for (U32 i = 0; i < size; ++i)
{
model->mSkinInfo.updateHash();
LLRenderPass::uploadMatrixPalette(mPreviewAvatar, &model->mSkinInfo);