summaryrefslogtreecommitdiff
path: root/indra/llprimitive
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-07-28 21:30:49 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-07-28 22:19:43 +0300
commit2d2ed85c56c0aa47e6909becaf60b71f1daaf46f (patch)
treedfa834bcf5df87eb1e9741155a1486f57992612c /indra/llprimitive
parent1531a31cd9907e5294df5cedbda2b9d1e3adb68b (diff)
DRTVWR-542 Fix malfunctioning warning
Diffstat (limited to 'indra/llprimitive')
-rw-r--r--indra/llprimitive/lldaeloader.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/indra/llprimitive/lldaeloader.cpp b/indra/llprimitive/lldaeloader.cpp
index dfa29fb539..d3acd44f06 100644
--- a/indra/llprimitive/lldaeloader.cpp
+++ b/indra/llprimitive/lldaeloader.cpp
@@ -787,7 +787,12 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac
for (U32 i = 0; i < verts.size(); ++i)
{
indices[i] = vert_idx[verts[i]];
- llassert(!i || (indices[i-1] != indices[i]));
+ if (i % 3 != 0) // assumes GL_TRIANGLES, compare 0-1, 1-2, 3-4, 4-5 but not 2-3 or 5-6
+ {
+ // A faulty degenerate triangle detection (triangle with 0 area),
+ // probably should be a warning and not an assert
+ llassert(!i || (indices[i-1] != indices[i]));
+ }
}
// DEBUG just build an expanded triangle list