diff options
author | Logan Dethrow <log@lindenlab.com> | 2012-12-13 18:35:07 -0500 |
---|---|---|
committer | Logan Dethrow <log@lindenlab.com> | 2012-12-13 18:35:07 -0500 |
commit | 9015344f8e1d246726a8dc4fbfcefb7e74525e6a (patch) | |
tree | ef17d2dbcc573a3126049e9bc444b78b7507ebc2 /indra/llrender/llvertexbuffer.cpp | |
parent | 3565f6f36db90e1a9a5918d8087f9dc0ab61eb69 (diff) | |
parent | 18ff702a9965ba8b9a17326b391f8edab01242f6 (diff) |
Merged SH-3339 work with sunshine-internal. Still a WIP.
Diffstat (limited to 'indra/llrender/llvertexbuffer.cpp')
-rw-r--r-- | indra/llrender/llvertexbuffer.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index 8e2ae65652..a33e5190ca 100644 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -291,7 +291,6 @@ void LLVBOPool::seedPool() - void LLVBOPool::cleanup() { U32 size = LL_VBO_BLOCK_SIZE; @@ -555,8 +554,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(); |