From 8be1958fb6edcfa41ce95febbc65e8f9f0856ba4 Mon Sep 17 00:00:00 2001 From: Brett Date: Tue, 14 Feb 2023 21:58:23 -0500 Subject: [PATCH] Minor cleanup before moving on --- src/main.cpp | 2 +- src/world/chunk/world.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 99d877e..3c2d274 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -45,7 +45,7 @@ int main() { chunk_shader = new fp::shader(shader_chunk_vert, shader_chunk_frag); world = new fp::world(); - world->setBlock({0,0,0}, 1); + //world->setBlock({0,0,0}, 1); for (int i = 1; i < CHUNK_SIZE; i++) for (int j = 0; j < 2; j++) diff --git a/src/world/chunk/world.cpp b/src/world/chunk/world.cpp index cd4a3b0..114c03c 100644 --- a/src/world/chunk/world.cpp +++ b/src/world/chunk/world.cpp @@ -111,8 +111,9 @@ void fp::world::render(fp::shader& shader) { auto& indices = chunk->mesh->getIndices(); // 11436 vert, 137,232 bytes + // 1908 vert, 11436 indices, 22896 + 45744 = 68,640 bytes - BLT_INFO("Chunk [%d, %d, %d] mesh updated with %d vertices and %d indices taking (%d, %d) bytes!", + BLT_DEBUG("Chunk [%d, %d, %d] mesh updated with %d vertices and %d indices taking (%d, %d) bytes!", chunk->pos.x, chunk->pos.y, chunk->pos.z, vertices.size(), indices.size(), vertices.size() * sizeof(vertex), indices.size() * sizeof(unsigned int)); @@ -133,7 +134,6 @@ void fp::world::render(fp::shader& shader) { shader.setMatrix("translation", translation); chunk->chunk_vao->bind(); glEnableVertexAttribArray(0); - //glDrawArrays(GL_TRIANGLES, 0, (int) chunk->render_size); glDrawElements(GL_TRIANGLES, (int)chunk->render_size, GL_UNSIGNED_INT, nullptr); glDisableVertexAttribArray(0); }