Patch from PolitikerNEU for RGB / RGBA files

This commit is contained in:
Mark Vejvoda
2010-03-26 16:55:17 +00:00
parent 1e519fedbe
commit 26289b70d2
8 changed files with 329 additions and 32 deletions

View File

@@ -754,6 +754,14 @@ void Pixmap3D::init(int d, int components){
pixels= NULL;
}
void Pixmap3D::init(int components){
this->w= -1;
this->h= -1;
this->d= -1;
this->components= components;
pixels= NULL;
}
Pixmap3D::~Pixmap3D(){
delete [] pixels;
}
@@ -821,6 +829,12 @@ void PixmapCube::init(int w, int h, int components){
}
}
void PixmapCube::init(int components){
for(int i=0; i<6; ++i){
faces[i].init(components);
}
}
//load & save
void PixmapCube::loadFace(const string &path, int face){
faces[face].load(path);