From 6f08184fcbcff04ad0efa5401462947a537abb0a Mon Sep 17 00:00:00 2001 From: David Williams Date: Fri, 19 Sep 2014 17:02:44 +0200 Subject: [PATCH] Fixed initialization of blocks. --- .../PolyVoxCore/include/PolyVoxCore/UncompressedBlock.inl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/library/PolyVoxCore/include/PolyVoxCore/UncompressedBlock.inl b/library/PolyVoxCore/include/PolyVoxCore/UncompressedBlock.inl index 083d763e..4e038024 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/UncompressedBlock.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/UncompressedBlock.inl @@ -54,6 +54,11 @@ namespace PolyVox // Page the data in m_pPager->pageIn(reg, this); } + else + { + // Just fill with zeros + std::fill(m_tData, m_tData + uNoOfVoxels, VoxelType()); + } // We'll use this later to decide if data needs to be paged out again. m_bDataModified = false;