feat: initialize world in multiple threads

This commit is contained in:
2026-04-18 12:35:48 +08:00
parent 099b1cbdd7
commit 11b6e88d0d
4 changed files with 43 additions and 7 deletions

View File

@@ -66,7 +66,7 @@ int Chunk::get_index(const glm::vec3& pos) {
return Chunk::get_index(pos.x, pos.y, pos.z);
}
void Chunk::gen_vertex_data(const std::vector<const std::vector<uint8_t>*>& neighbor_block) {
void Chunk::gen_vertex_data(const std::array<const std::vector<uint8_t>*, 4>& neighbor_block) {
m_vertexs_data.clear();
static const glm::ivec3 DIR[6] = {