Fixed paging example.
This commit is contained in:
parent
938eea7c8e
commit
acb43d54d9
@ -216,18 +216,8 @@ public:
|
|||||||
|
|
||||||
virtual void pageIn(const Region& region, Block<MaterialDensityPair44>* pBlockData)
|
virtual void pageIn(const Region& region, Block<MaterialDensityPair44>* pBlockData)
|
||||||
{
|
{
|
||||||
POLYVOX_ASSERT(false, "NOT IMPLEMENTED");
|
pBlockData->createUncompressedData();
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void pageOut(const Region& region, Block<MaterialDensityPair44>* pBlockData)
|
|
||||||
{
|
|
||||||
std::cout << "warning unloading region: " << region.getLowerCorner() << " -> " << region.getUpperCorner() << std::endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void dataRequiredHandler(const ConstVolumeProxy<MaterialDensityPair44>& volumeProxy, const Region& region)
|
|
||||||
{
|
|
||||||
Perlin perlin(2,2,1,234);
|
Perlin perlin(2,2,1,234);
|
||||||
|
|
||||||
for(int x = region.getLowerX(); x <= region.getUpperX(); x++)
|
for(int x = region.getLowerX(); x <= region.getUpperX(); x++)
|
||||||
@ -261,10 +251,22 @@ public:
|
|||||||
voxel.setDensity(MaterialDensityPair44::getMinDensity());
|
voxel.setDensity(MaterialDensityPair44::getMinDensity());
|
||||||
}
|
}
|
||||||
|
|
||||||
volumeProxy.setVoxelAt(x, y, z, voxel);
|
pBlockData->setVoxelAt(x - region.getLowerX(), y - region.getLowerY(), z - region.getLowerZ(), voxel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pBlockData->destroyUncompressedData();
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void pageOut(const Region& region, Block<MaterialDensityPair44>* pBlockData)
|
||||||
|
{
|
||||||
|
std::cout << "warning unloading region: " << region.getLowerCorner() << " -> " << region.getUpperCorner() << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void dataRequiredHandler(const ConstVolumeProxy<MaterialDensityPair44>& volumeProxy, const Region& region)
|
||||||
|
{
|
||||||
|
POLYVOX_ASSERT(false, "NOT IMPLEMENTED");
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void dataOverflowHandler(const ConstVolumeProxy<MaterialDensityPair44>& /*volumeProxy*/, const Region& region)
|
virtual void dataOverflowHandler(const ConstVolumeProxy<MaterialDensityPair44>& /*volumeProxy*/, const Region& region)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user