summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatermodelpreview.cpp
diff options
context:
space:
mode:
authorprep <prep@lindenlab.com>2011-06-22 15:55:39 -0400
committerprep <prep@lindenlab.com>2011-06-22 15:55:39 -0400
commit6629a77cac8b82d3c6f64e7c21f8af116fd4e259 (patch)
treeb6de02d89aa04885697bba6e758ff847f1180899 /indra/newview/llfloatermodelpreview.cpp
parent0961c3baaa6f5be42d4c3996c0563f905a8df053 (diff)
parent13202345d5d4aee652e160a437ec765090f3ec63 (diff)
merge
Diffstat (limited to 'indra/newview/llfloatermodelpreview.cpp')
-rw-r--r--indra/newview/llfloatermodelpreview.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 9721fc9224..1c48795ea7 100644
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -4100,18 +4100,20 @@ void LLModelPreview::updateStatusMessages()
}
else if (!verts[lod].empty())
{
+ S32 sum_verts_higher_lod = 0;
+ S32 sum_verts_this_lod = 0;
for (U32 i = 0; i < verts[lod].size(); ++i)
{
- S32 max_verts = i < verts[lod+1].size() ? verts[lod+1][i] : 0;
+ sum_verts_higher_lod += ((i < verts[lod+1].size()) ? verts[lod+1][i] : 0);
+ sum_verts_this_lod += verts[lod][i];
+ }
- if (max_verts > 0)
- {
- if (verts[lod][i] > max_verts)
- { //too many vertices in this lod
- message = "mesh_status_too_many_vertices";
- upload_status[lod] = 2;
- }
- }
+ if ((sum_verts_higher_lod > 0) &&
+ (sum_verts_this_lod > sum_verts_higher_lod))
+ {
+ //too many vertices in this lod
+ message = "mesh_status_too_many_vertices";
+ upload_status[lod] = 2;
}
}
}