From 19329efaa6c163b5b081f9fa5b93ad8424f4aced Mon Sep 17 00:00:00 2001 From: Marc Gilleron Date: Tue, 23 Apr 2019 23:35:43 +0100 Subject: [PATCH] Initialize stats before each meshing --- dmc/voxel_mesher_dmc.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dmc/voxel_mesher_dmc.cpp b/dmc/voxel_mesher_dmc.cpp index 9a84576..36f60dc 100644 --- a/dmc/voxel_mesher_dmc.cpp +++ b/dmc/voxel_mesher_dmc.cpp @@ -1280,6 +1280,8 @@ Ref VoxelMesherDMC::build_mesh(const VoxelBuffer &voxels) { // - Gradients must be precalculated // - The non-padded area size is cubic and power of two + _stats = { 0 }; + int padding = 1; const Vector3i buffer_size = voxels.get_size(); // Taking previous power of two because the algorithm uses an integer cubic octree, and data should be padded