- turned off the interpolation cache which was taking too much memory. Please test this to see if performance is affected, this should REALLY help with memory usage.

This commit is contained in:
Mark Vejvoda
2012-07-22 00:04:44 +00:00
parent e1054d6e07
commit f681b309a9
4 changed files with 13 additions and 3 deletions

View File

@@ -30,6 +30,8 @@ namespace Shared{ namespace Graphics{
// class InterpolationData
// =====================================================
bool InterpolationData::enableCache = false;
InterpolationData::InterpolationData(const Mesh *mesh) {
assert(GlobalStaticFlags::getIsNonGraphicalModeEnabled() == false);
@@ -43,8 +45,6 @@ InterpolationData::InterpolationData(const Mesh *mesh) {
normals= new Vec3f[mesh->getVertexCount()];
}
enableCache = true;
cacheVertices.clear();
cacheNormals.clear();
}

View File

@@ -117,6 +117,9 @@ void Mesh::end() {
// ========================== shadows & interpolation =========================
void Mesh::buildInterpolationData(){
if(interpolationData != NULL) {
printf("**WARNING possible memory leak [Mesh::buildInterpolationData()]\n");
}
interpolationData= new InterpolationData(this);
}