Browse Source

Remove unnecessary error when mesh batch is not indexed. Code review required. Tested fine using non-indexed batches with over 100k verticies.

Ken Whatmough 13 years ago
parent
commit
b09154b746
1 changed files with 1 additions and 1 deletions
  1. 1 1
      gameplay/src/MeshBatch.cpp

+ 1 - 1
gameplay/src/MeshBatch.cpp

@@ -114,7 +114,7 @@ bool MeshBatch::resize(unsigned int capacity)
     // (we only know how many indices will be stored). Assume the worst case
     // for now, which is the same number of vertices as indices.
     unsigned int indexCapacity = vertexCapacity;
-    if (indexCapacity > USHRT_MAX)
+    if (_indexed && indexCapacity > USHRT_MAX)
     {
         GP_ERROR("Index capacity is greater than the maximum unsigned short value (%d > %d).", indexCapacity, USHRT_MAX);
         return false;