Removing explicit functions to control the number of compressed and uncompressed blocks in memory, and letting the user set a memory limit instead.

This commit is contained in:
Daviw Williams
2013-07-04 16:23:58 +02:00
parent 26f512eba7
commit bd60f34bd7
5 changed files with 61 additions and 30 deletions

View File

@ -153,8 +153,9 @@ int main(int argc, char *argv[])
RLECompressor<MaterialDensityPair44, uint16_t>* compressor = new RLECompressor<MaterialDensityPair44, uint16_t>();
PerlinNoisePager* pager = new PerlinNoisePager();
LargeVolume<MaterialDensityPair44> volData(PolyVox::Region::MaxRegion, compressor, pager, 256);
volData.setMaxNumberOfBlocksInMemory(4096);
volData.setMaxNumberOfUncompressedBlocks(64);
//volData.setMaxNumberOfBlocksInMemory(4096);
//volData.setMaxNumberOfUncompressedBlocks(64);
volData.setTargetMemoryLimitInBytes(128 * 1024 * 1024);
//volData.setMaxNumberOfUncompressedBlocks(4096);
//createSphereInVolume(volData, 30);