diff --git a/library/PolyVoxCore/include/PolyVoxCore/PolyVoxForwardDeclarations.h b/library/PolyVoxCore/include/PolyVoxCore/PolyVoxForwardDeclarations.h index d618bb6e..05092ab1 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/PolyVoxForwardDeclarations.h +++ b/library/PolyVoxCore/include/PolyVoxCore/PolyVoxForwardDeclarations.h @@ -86,6 +86,11 @@ namespace PolyVox typedef DensityU8 Density8; //Backwards compatibility typedef DensityU16 Density16; //Backwards compatibility + //////////////////////////////////////////////////////////////////////////////// + // FilePager + //////////////////////////////////////////////////////////////////////////////// + template class FilePager; + //////////////////////////////////////////////////////////////////////////////// // LargeVolume //////////////////////////////////////////////////////////////////////////////// @@ -112,6 +117,11 @@ namespace PolyVox typedef MaterialDensityPair MaterialDensityPair44; typedef MaterialDensityPair MaterialDensityPair88; + //////////////////////////////////////////////////////////////////////////////// + // Pager + //////////////////////////////////////////////////////////////////////////////// + template class Pager; + //////////////////////////////////////////////////////////////////////////////// // PositionMaterial //////////////////////////////////////////////////////////////////////////////// diff --git a/tests/testvolume.cpp b/tests/testvolume.cpp index 4a4d638d..77ad1063 100644 --- a/tests/testvolume.cpp +++ b/tests/testvolume.cpp @@ -23,6 +23,7 @@ freely, subject to the following restrictions: #include "testvolume.h" +#include "PolyVoxCore/FilePager.h" #include "PolyVoxCore/LargeVolume.h" #include "PolyVoxCore/MinizCompressor.h" #include "PolyVoxCore/RawVolume.h" @@ -273,15 +274,15 @@ TestVolume::TestVolume() //m_pCompressor = new RLECompressor; m_pCompressor = new MinizCompressor; + m_pFilePager = new FilePager("./"); //Create the volumes m_pRawVolume = new RawVolume(region); m_pSimpleVolume = new SimpleVolume(region); - m_pLargeVolume = new LargeVolume(region, m_pCompressor, 0, 32); + m_pLargeVolume = new LargeVolume(region, m_pCompressor, m_pFilePager, 32); - // LargeVolume currently fails a test if compression is enabled. It - // may be related to accessing the data through more than one sampler? - //m_pLargeVolume->setCompressionEnabled(false); + m_pLargeVolume->setMaxNumberOfBlocksInMemory(32); + m_pLargeVolume->setMaxNumberOfUncompressedBlocks(16); //Fill the volume with some data for(int z = region.getLowerZ(); z <= region.getUpperZ(); z++) @@ -305,6 +306,7 @@ TestVolume::~TestVolume() delete m_pSimpleVolume; delete m_pLargeVolume; + delete m_pFilePager; delete m_pCompressor; } diff --git a/tests/testvolume.h b/tests/testvolume.h index 0c363109..8a3e46d7 100644 --- a/tests/testvolume.h +++ b/tests/testvolume.h @@ -66,6 +66,8 @@ private slots: private: PolyVox::Compressor* m_pCompressor; + PolyVox::FilePager* m_pFilePager; + PolyVox::RawVolume* m_pRawVolume; PolyVox::SimpleVolume* m_pSimpleVolume; PolyVox::LargeVolume* m_pLargeVolume;