summaryrefslogtreecommitdiff
path: root/src/chunk.hpp
diff options
context:
space:
mode:
authortylermurphy534 <tylermurphy534@gmail.com>2022-09-30 00:25:12 -0400
committertylermurphy534 <tylermurphy534@gmail.com>2022-09-30 00:25:12 -0400
commit5d3b1bc1752e1e684bad8c0a8a1e11be99493e5e (patch)
treea2e8f5f4ddc9f7966ab77520d5cbd0d3a36a9c49 /src/chunk.hpp
parentdescriptor pool final fix (diff)
downloadminecraftvulkan-5d3b1bc1752e1e684bad8c0a8a1e11be99493e5e.tar.gz
minecraftvulkan-5d3b1bc1752e1e684bad8c0a8a1e11be99493e5e.tar.bz2
minecraftvulkan-5d3b1bc1752e1e684bad8c0a8a1e11be99493e5e.zip
greedy meshing
Diffstat (limited to '')
-rw-r--r--src/chunk.hpp68
1 files changed, 1 insertions, 67 deletions
diff --git a/src/chunk.hpp b/src/chunk.hpp
index 18230c8..59df514 100644
--- a/src/chunk.hpp
+++ b/src/chunk.hpp
@@ -77,81 +77,15 @@ class Chunk {
Chunk(int32_t gridX, int32_t gridZ, uint32_t world_seed);
~Chunk();
- static void addVerticies(Chunk* c, uint8_t side, int32_t x, int32_t y, int32_t z, uint8_t block);
-
bool generated{false};
bool reload{false};
bool working{false};
xe::Model* chunkMesh;
xe::Model::Data vertexData;
- std::vector<uint8_t> cubes;
+ std::vector<uint8_t> cubes{};
std::thread worker;
};
-const float px[36][3] = {
- // POS X
- {0.5f,0.5f,0.5f},
- {0.5f,-0.5f,0.5f},
- {0.5f,-0.5f,-0.5f},
- {0.5f,-0.5f,-0.5f},
- {0.5f,0.5f,-0.5f},
- {0.5f,0.5f,0.5f},
- // NEG X
- {-0.5f,0.5f,-0.5f},
- {-0.5f,-0.5f,-0.5f},
- {-0.5f,-0.5f,0.5f},
- {-0.5f,-0.5f,0.5f},
- {-0.5f,0.5f,0.5f},
- {-0.5f,0.5f,-0.5f},
- // POS Y
- {0.5f,0.5f,-0.5f},
- {-0.5f,0.5f,-0.5f},
- {-0.5f,0.5f,0.5f},
- {-0.5f,0.5f,0.5f},
- {0.5f,0.5f,0.5f},
- {0.5f,0.5f,-0.5f},
- // NEG Y
- {-0.5f,-0.5f,0.5f},
- {-0.5f,-0.5f,-0.5f},
- {0.5f,-0.5f,-0.5f},
- {0.5f,-0.5f,-0.5f},
- {0.5f,-0.5f,0.5f},
- {-0.5f,-0.5f,0.5f},
- // POS Z
- {-0.5f,0.5f,0.5f},
- {-0.5f,-0.5f,0.5f},
- {0.5f,-0.5f,0.5f},
- {0.5f,-0.5f,0.5f},
- {0.5f,0.5f,0.5f},
- {-0.5f,0.5f,0.5f},
- // NEG Z
- {0.5f,0.5f,-0.5f},
- {0.5f,-0.5f,-0.5f},
- {-0.5f,-0.5f,-0.5f},
- {-0.5f,-0.5f,-0.5f},
- {-0.5f,0.5f,-0.5f},
- {0.5f,0.5f,-0.5f}
-};
-
-const float nm[6][3] = {
- {1.f,0.f,0.f},
- {-1.f,0.f,0.f},
- {0.f,1.f,0.f},
- {0.f,-1.f,0.f},
- {0.f,0.f,1.f},
- {0.f,0.f,-1.f}
-};
-
-
-const float uv[6][2] = {
- {1.f,0.f},
- {1.f,1.f},
- {0.f,1.f},
- {0.f,1.f},
- {0.f,0.f},
- {1.f,0.f}
-};
-
} \ No newline at end of file