Drastically reduced memory usage.
This commit is contained in:
@ -25,12 +25,14 @@ namespace PolyVox
|
||||
std::vector<boost::uint16_t> m_vecTriangleIndices;
|
||||
std::vector<SurfaceVertex> m_vecVertices;
|
||||
|
||||
long int vertexIndices[POLYVOX_REGION_SIDE_LENGTH*2+1][POLYVOX_REGION_SIDE_LENGTH*2+1][POLYVOX_REGION_SIDE_LENGTH*2+1];
|
||||
static long int vertexIndices[POLYVOX_REGION_SIDE_LENGTH*2+1][POLYVOX_REGION_SIDE_LENGTH*2+1][POLYVOX_REGION_SIDE_LENGTH*2+1];
|
||||
|
||||
static long int noOfVerticesSubmitted;
|
||||
static long int noOfVerticesAccepted;
|
||||
static long int noOfTrianglesSubmitted;
|
||||
|
||||
long int getSizeInBytes(void);
|
||||
|
||||
private:
|
||||
bool m_AllowDuplicateVertices;
|
||||
};
|
||||
|
@ -37,6 +37,20 @@ namespace PolyVox
|
||||
IndexedSurfacePatch* m_patchSingleMaterial;
|
||||
IndexedSurfacePatch* m_patchMultiMaterial;
|
||||
|
||||
long int getSizeInBytes(void)
|
||||
{
|
||||
long int size = sizeof(RegionGeometry);
|
||||
if(m_patchSingleMaterial)
|
||||
{
|
||||
size += m_patchSingleMaterial->getSizeInBytes();
|
||||
}
|
||||
if(m_patchMultiMaterial)
|
||||
{
|
||||
size += m_patchMultiMaterial->getSizeInBytes();
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user