mirror of
https://github.com/glest/glest-source.git
synced 2025-08-16 05:13:59 +02:00
- 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:
@@ -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();
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user