From 0066bd77d25793b76fdaa9a62755cca934f0121d Mon Sep 17 00:00:00 2001 From: RealBadAngel Date: Wed, 15 Oct 2014 04:13:53 +0200 Subject: Add meshnode drawtype. --- src/mapblock_mesh.cpp | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) (limited to 'src/mapblock_mesh.cpp') diff --git a/src/mapblock_mesh.cpp b/src/mapblock_mesh.cpp index d75d3e148..a7fafa683 100644 --- a/src/mapblock_mesh.cpp +++ b/src/mapblock_mesh.cpp @@ -1428,3 +1428,54 @@ void MeshCollector::append(const TileSpec &tile, p->vertices.push_back(vertices[i]); } } + +/* + MeshCollector - for meshnodes and converted drawtypes. +*/ + +void MeshCollector::append(const TileSpec &tile, + const video::S3DVertex *vertices, u32 numVertices, + const u16 *indices, u32 numIndices, + v3f pos, video::SColor c) +{ + if(numIndices > 65535) + { + dstream<<"FIXME: MeshCollector::append() called with numIndices="< 65535) + continue; + + p = &pp; + break; + } + + if(p == NULL) + { + PreMeshBuffer pp; + pp.tile = tile; + prebuffers.push_back(pp); + p = &prebuffers[prebuffers.size()-1]; + } + + u32 vertex_count = p->vertices.size(); + for(u32 i=0; iindices.push_back(j); + } + for(u32 i=0; ivertices.push_back(vert); + } +} -- cgit v1.2.3