Evening
I've got a quick question since this has been baffling me.
I've created a simple volume of 65x65x257 using int32 (4 bytes) per voxel.
Using that logic, the SimpleVolume.calculateSizeInBytes() function should be returning: 4,343,300
Give or take a small (in relative terms) margin to accommodate additional data.
Simple cration code is below:
Code:
///In class header/////
PolyVox::SimpleVolume<uint32_t> volData;
/////////////////////////
CubeNode::CubeNode() :
volData(PolyVox::Region(PolyVox::Vector3DInt32(0,0,0),
PolyVox::Vector3DInt32(64, 256, 64)))
{
int k = volData.calculateSizeInBytes();
int h = 0;
}
I put a breakpoint at (int h = 0) to show me the value of K.
However, k = 10,748,000
The memory actually stored is more than double the specified number of bytes.
I can confirm the number is accurate from Task manager.
Is there something I'm doing wrong here? Is there a better storage medium than SimpleVolume?
Essentially my main interest in polyvox lies in the mesh optimization, so if there's an unconventional solution to maintain that element in particular I'm all ears.
Cheers!