Added one of the models though resizing doesn't seem to be working rn

This commit is contained in:
Warwick 2022-08-11 16:40:48 +01:00
parent 592a9febbd
commit 73346ebab9
3 changed files with 4 additions and 4 deletions

@ -1 +1 @@
Subproject commit b7a336975402dde6692fcc9d8c986136d1c724f6 Subproject commit 40364e65f0acfcd74effad083c94a179f765678a

View file

@ -15,7 +15,7 @@ void MarchingCubeChunkRenderer::draw(ShaderLoader &shader) {
for (int x = ti.xRange[0]; x < ti.xRange[1]; x++) { for (int x = ti.xRange[0]; x < ti.xRange[1]; x++) {
for (int y = ti.yRange[0]; y < ti.yRange[1]; y++) { for (int y = ti.yRange[0]; y < ti.yRange[1]; y++) {
for (int z = ti.zRange[0]; z < ti.zRange[1]; z++) { for (int z = ti.zRange[0]; z < ti.zRange[1]; z++) {
if (chunk->getNoise(x, y, z) > 0) { if (chunk->getNoise(x, y, z) > 0.5) {
models.at(0)->setPosition(glm::vec3(x, y, z)); models.at(0)->setPosition(glm::vec3(x, y, z));
models.at(0)->draw(shader); models.at(0)->draw(shader);
} }

View file

@ -15,8 +15,8 @@ Terrain::Terrain() : renderer(nullptr) {
chunks.push_back(Chunk(fnGenerator, ti)); chunks.push_back(Chunk(fnGenerator, ti));
// Create chunks renderer. // Create chunks renderer.
models = {new Model( models = {new Model(ROOT_DIR "data/game-models/12/MetalFloor.obj")};
ROOT_DIR "data/models/wooden_boxbarrel/wooden_box_and_barrel.obj")}; models.at(0)->resize(glm::vec3(0.1f, 0.1f, 0.1f));
renderer = new MarchingCubeChunkRenderer(this->chunks, models); renderer = new MarchingCubeChunkRenderer(this->chunks, models);
} }