- a bunch of in progress work related to texture compression and more timely texture memory management cleanup. For now to test texture compression use the following ini setting: EnableTextureCompression=true

This commit is contained in:
Mark Vejvoda
2010-10-28 00:51:25 +00:00
parent 3c57f16a4a
commit de3a92081d
24 changed files with 353 additions and 100 deletions

View File

@@ -352,8 +352,13 @@ void Pixmap1D::init(int w, int components){
pixels= new uint8[w*components];
}
Pixmap1D::~Pixmap1D(){
void Pixmap1D::deletePixels() {
delete [] pixels;
pixels = NULL;
}
Pixmap1D::~Pixmap1D(){
deletePixels();
}
void Pixmap1D::load(const string &path){
@@ -463,8 +468,13 @@ void Pixmap2D::init(int w, int h, int components) {
pixels= new uint8[h*w*components];
}
Pixmap2D::~Pixmap2D(){
void Pixmap2D::deletePixels() {
delete [] pixels;
pixels = NULL;
}
Pixmap2D::~Pixmap2D(){
deletePixels();
}
Pixmap2D* Pixmap2D::loadPath(const string& path) {
@@ -778,8 +788,13 @@ void Pixmap3D::init(int components){
pixels= NULL;
}
Pixmap3D::~Pixmap3D(){
void Pixmap3D::deletePixels() {
delete [] pixels;
pixels = NULL;
}
Pixmap3D::~Pixmap3D(){
deletePixels();
}
void Pixmap3D::loadSlice(const string &path, int slice){
@@ -862,5 +877,11 @@ void PixmapCube::loadFace(const string &path, int face){
faces[face].load(path);
}
void PixmapCube::deletePixels() {
for(int i=0; i<6; ++i){
faces[i].deletePixels();
}
}
}}//end namespace