aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRealBadAngel <maciej.kasatkin@o2.pl>2016-02-16 03:51:57 +0100
committerparamat <mat.gregory@virginmedia.com>2016-02-16 08:23:32 +0000
commit08517244f7d19556f0449ff5d90f66e9ef079977 (patch)
tree6cfaaf945c0b370022d9e9e80158a21d2f5076d1 /src
parent7ea40e45b1bf893aa693c179cbe8612ede86faee (diff)
downloadminetest-08517244f7d19556f0449ff5d90f66e9ef079977.tar.gz
minetest-08517244f7d19556f0449ff5d90f66e9ef079977.tar.bz2
minetest-08517244f7d19556f0449ff5d90f66e9ef079977.zip
Mapblock mesh: Eliminate meshgen lags
Diffstat (limited to 'src')
-rw-r--r--src/mapblock_mesh.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/mapblock_mesh.cpp b/src/mapblock_mesh.cpp
index 8b3d3c0dd..42e84b75e 100644
--- a/src/mapblock_mesh.cpp
+++ b/src/mapblock_mesh.cpp
@@ -1425,7 +1425,6 @@ void MeshCollector::append(const TileSpec &tile,
u32 vertex_count;
if (m_use_tangent_vertices) {
vertex_count = p->tangent_vertices.size();
- p->tangent_vertices.reserve(vertex_count + numVertices);
for (u32 i = 0; i < numVertices; i++) {
video::S3DVertexTangents vert(vertices[i].Pos, vertices[i].Normal,
vertices[i].Color, vertices[i].TCoords);
@@ -1433,7 +1432,6 @@ void MeshCollector::append(const TileSpec &tile,
}
} else {
vertex_count = p->vertices.size();
- p->vertices.reserve(vertex_count + numVertices);
for (u32 i = 0; i < numVertices; i++) {
video::S3DVertex vert(vertices[i].Pos, vertices[i].Normal,
vertices[i].Color, vertices[i].TCoords);
@@ -1441,7 +1439,6 @@ void MeshCollector::append(const TileSpec &tile,
}
}
- p->indices.reserve(p->indices.size() + numIndices);
for (u32 i = 0; i < numIndices; i++) {
u32 j = indices[i] + vertex_count;
p->indices.push_back(j);
@@ -1484,7 +1481,6 @@ void MeshCollector::append(const TileSpec &tile,
u32 vertex_count;
if (m_use_tangent_vertices) {
vertex_count = p->tangent_vertices.size();
- p->tangent_vertices.reserve(vertex_count + numVertices);
for (u32 i = 0; i < numVertices; i++) {
video::S3DVertexTangents vert(vertices[i].Pos + pos,
vertices[i].Normal, c, vertices[i].TCoords);
@@ -1492,7 +1488,6 @@ void MeshCollector::append(const TileSpec &tile,
}
} else {
vertex_count = p->vertices.size();
- p->vertices.reserve(vertex_count + numVertices);
for (u32 i = 0; i < numVertices; i++) {
video::S3DVertex vert(vertices[i].Pos + pos,
vertices[i].Normal, c, vertices[i].TCoords);
@@ -1500,7 +1495,6 @@ void MeshCollector::append(const TileSpec &tile,
}
}
- p->indices.reserve(p->indices.size() + numIndices);
for (u32 i = 0; i < numIndices; i++) {
u32 j = indices[i] + vertex_count;
p->indices.push_back(j);