mirror of
https://github.com/glest/glest-source.git
synced 2025-10-01 09:56:41 +02:00
- 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:
@@ -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
|
||||
|
Reference in New Issue
Block a user