diff --git a/src/inc/chunk.hpp b/src/inc/chunk.hpp index 067c066..b8acbac 100644 --- a/src/inc/chunk.hpp +++ b/src/inc/chunk.hpp @@ -46,10 +46,12 @@ chunk* allocate_chunk { // Allocate memory to hold the enclosed region's vertex arrays. - float* target = (float*)malloc(x_res * y_res * z_res * 4 * 2 * 2 * 3 * 7 * sizeof(float)); + float* target = (float*)malloc(x_res * y_res * z_res * 6 * 2 * 2 * 3 * 7 * sizeof(float)); float* water_target = (float*)malloc(x_res * y_res * z_res * 4 * 2 * 2 * 3 * 7 * sizeof(float)); + int Time_On_End = SDL_GetTicks(); + if (!target || !water_target) { std::cout << "Could not allocate enough memory for a new chunk." << std::endl; @@ -189,7 +191,7 @@ chunk* allocate_chunk the_chunk->water_target_vao = water_target_vao; the_chunk->water_target_vbo = water_target_vbo; } - + // Return the_chunk. return the_chunk;