ker wrote:
doesn't seem like that at all, the current interface is much better.
did you also create a way to disable rle?
Yep, it's just gone in, You can now call setCompressionEnabled(false). From my point of view I now happy with the features. I'm going to make your example into a seperate 'PagingExample' and revert the Basic example back to it's previous state. Then write some documentation, and then I think we can merge back to the trunk.
ker wrote:
I think we need one more thing for streaming thou. and that is a function to force a load of a region, and force an unload of a region. (obviously force-unload only unloads full blocks inside the given region, and force-load loads full blocks even if they only touch the given region with 1 voxel)
these functions might even return some value (like a region) of what was actually loaded/unloaded
I do not require the force-load at all, but the force-unload is something that can't even be triggered from the outside.
This is an interesting question. This sounds a bit abstract, but as I see it the paging mechanism isn't intended as a way of loading data into the volume (although I accept it can be used for this). In your case I would say that the whole world exists in the volume at all times, it's just that parts of it are being cached in memory for faster access.
I'm not sure if I'm talking sense here I'm just trying to decide what are the right concepts. But on this basis, I might ask why you want to force part of your volume out of memory. If it's because the application is shutting down and so you want to save any changes, then remember you can still access all the data (whether it's in memory or not) using Volume::getVoxelAt().
Ok, but dispite saying that I can see it would make users code simpler if they could force-unload, as they can have all their saving code in one place. And it's quite a simple feature to implement.
Actually, can't you just call setMaxNumberOfBlocksInMemory(0) to achieve this?
As for force loading, yes I agree. This is a useful way or warning the volume that you are about to use a particular part of the volume and it should be ready for it. It can take a region, compute which blocks are inside it, and simply call getUncompressedBlock() on each. You want to implement that?