diff options
author | Vitaliy <silverunicorn2011@yandex.ru> | 2018-03-22 22:59:49 +0300 |
---|---|---|
committer | Loïc Blot <nerzhul@users.noreply.github.com> | 2018-03-22 20:59:49 +0100 |
commit | 9fcc0c1217fcd3acabaa11239631de10032fa126 (patch) | |
tree | 7596bc17bd51f5b9d22ad918743d90fcfa0e2278 /src/mapblock_mesh.h | |
parent | 8986a9e6053bed0002726bc000ee394a928b7f51 (diff) | |
download | minetest-9fcc0c1217fcd3acabaa11239631de10032fa126.tar.gz minetest-9fcc0c1217fcd3acabaa11239631de10032fa126.tar.bz2 minetest-9fcc0c1217fcd3acabaa11239631de10032fa126.zip |
Update mesh collector and move it to a separate file (#6904)
* Update MeshCollector
* Simplify MeshCollector
Diffstat (limited to 'src/mapblock_mesh.h')
-rw-r--r-- | src/mapblock_mesh.h | 45 |
1 files changed, 0 insertions, 45 deletions
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<u16> indices; - std::vector<video::S3DVertex> vertices; - std::vector<video::S3DVertexTangents> tangent_vertices; -}; - -struct MeshCollector -{ - std::array<std::vector<PreMeshBuffer>, 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 |