From 9a559eb8cf5c9178f89b9c3883f7d4ebec187eb9 Mon Sep 17 00:00:00 2001 From: Kahrl Date: Thu, 25 Apr 2013 18:32:18 +0200 Subject: Remove 'Meshbuffer ran out of indices' limitation --- src/mapblock_mesh.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/mapblock_mesh.cpp') diff --git a/src/mapblock_mesh.cpp b/src/mapblock_mesh.cpp index f8a0b5f06..0f83e863c 100644 --- a/src/mapblock_mesh.cpp +++ b/src/mapblock_mesh.cpp @@ -1338,12 +1338,20 @@ void MeshCollector::append(const TileSpec &tile, const video::S3DVertex *vertices, u32 numVertices, const u16 *indices, u32 numIndices) { + if(numIndices > 65535) + { + dstream<<"FIXME: MeshCollector::append() called with numIndices="< 65535) + continue; p = &pp; break; @@ -1361,11 +1369,6 @@ void MeshCollector::append(const TileSpec &tile, for(u32 i=0; i 65535) - { - dstream<<"FIXME: Meshbuffer ran out of indices"<indices.push_back(j); } for(u32 i=0; i