diff options
author | Oz Linden <oz@lindenlab.com> | 2012-11-13 11:57:14 -0500 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2012-11-13 11:57:14 -0500 |
commit | be210914f4e9081f021cc1ad3b671765aba79b61 (patch) | |
tree | 006e4ec827b8c1b3cf6042c08e12aadf48f43943 /indra/llrender/llvertexbuffer.cpp | |
parent | 7e779a29c142feaa34a30dff39b72d0ae7c0fdc3 (diff) | |
parent | d8f081cf1b18ddb5f0412b21f4d36bfce6abae19 (diff) |
merge changes for DRTVWR-238
Diffstat (limited to 'indra/llrender/llvertexbuffer.cpp')
-rw-r--r-- | indra/llrender/llvertexbuffer.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index eadef93c89..2fe0aa0b72 100644 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -555,8 +555,21 @@ void LLVertexBuffer::drawArrays(U32 mode, const std::vector<LLVector3>& pos, con gGL.syncMatrices(); U32 count = pos.size(); - llassert_always(norm.size() >= pos.size()); - llassert_always(count > 0); + + llassert(norm.size() >= pos.size()); + llassert(count > 0); + + if( count == 0 ) + { + llwarns << "Called drawArrays with 0 vertices" << llendl; + return; + } + + if( norm.size() < pos.size() ) + { + llwarns << "Called drawArrays with #" << norm.size() << " normals and #" << pos.size() << " vertices" << llendl; + return; + } unbind(); |