From 9fcc0c1217fcd3acabaa11239631de10032fa126 Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Thu, 22 Mar 2018 22:59:49 +0300 Subject: Update mesh collector and move it to a separate file (#6904) * Update MeshCollector * Simplify MeshCollector --- src/mapblock_mesh.h | 45 --------------------------------------------- 1 file changed, 45 deletions(-) (limited to 'src/mapblock_mesh.h') diff --git a/src/mapblock_mesh.h b/src/mapblock_mesh.h index 2f1f3871d..39bc2f318 100644 --- a/src/mapblock_mesh.h +++ b/src/mapblock_mesh.h @@ -173,51 +173,6 @@ private: v3s16 m_camera_offset; }; - - -/* - This is used because CMeshBuffer::append() is very slow -*/ -struct PreMeshBuffer -{ - TileLayer layer; - std::vector indices; - std::vector vertices; - std::vector tangent_vertices; -}; - -struct MeshCollector -{ - std::array, MAX_TILE_LAYERS> prebuffers; - bool m_use_tangent_vertices; - - MeshCollector(bool use_tangent_vertices): - m_use_tangent_vertices(use_tangent_vertices) - { - } - - void append(const TileSpec &material, - const video::S3DVertex *vertices, u32 numVertices, - const u16 *indices, u32 numIndices); - void append(const TileLayer &material, - const video::S3DVertex *vertices, u32 numVertices, - const u16 *indices, u32 numIndices, u8 layernum, - bool use_scale = false); - void append(const TileSpec &material, - const video::S3DVertex *vertices, u32 numVertices, - const u16 *indices, u32 numIndices, v3f pos, - video::SColor c, u8 light_source); - void append(const TileLayer &material, - const video::S3DVertex *vertices, u32 numVertices, - const u16 *indices, u32 numIndices, v3f pos, - video::SColor c, u8 light_source, u8 layernum, - bool use_scale = false); - /*! - * Colorizes all vertices in the collector. - */ - void applyTileColors(); -}; - /*! * Encodes light of a node. * The result is not the final color, but a -- cgit v1.2.3