diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2011-06-22 15:43:57 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2011-06-22 15:43:57 -0400 |
commit | 13202345d5d4aee652e160a437ec765090f3ec63 (patch) | |
tree | c16a5bf88beb80a450d1ff8487609a8cb711cbba /indra | |
parent | 7bf28da6634ad0acc362a7b50faaf0646027b3c5 (diff) |
SH-989 FIX - only reject LOD if vertex total is too high, rather than checking mesh-by-mesh. This should make rejections much less common.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llfloatermodelpreview.cpp | 20 |
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; } } } |