Making use of sampling adjacent voxels. General optimisations and improvements.

This commit is contained in:
David Williams
2009-06-06 23:08:08 +00:00
parent 41e33b1f59
commit 3010eb341d
7 changed files with 174 additions and 188 deletions

View File

@ -61,7 +61,7 @@ namespace PolyVox
stream.write(reinterpret_cast<char*>(&volumeDepthPower), sizeof(volumeDepthPower));
//Write data
VolumeSampler<uint8_t> volIter(volume);
VolumeSampler<uint8_t> volIter(&volume);
for(uint16_t z = 0; z < volumeDepth; ++z)
{
for(uint16_t y = 0; y < volumeHeight; ++y)
@ -143,7 +143,7 @@ namespace PolyVox
stream.write(reinterpret_cast<char*>(&volumeDepthPower), sizeof(volumeDepthPower));
//Write data
VolumeSampler<uint8_t> volIter(volume);
VolumeSampler<uint8_t> volIter(&volume);
uint8_t current = 0;
uint32_t runLength = 0;
bool firstTime = true;