X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FTexture.cpp;h=dd2d1cc63ff0e0b7760bcfa4bb7324c3ba8a35b0;hb=5fcf8f2dd84714a4563c5db291f7b173eda434d4;hp=08010c389f3ed0c84951e768edbf61424c8111ec;hpb=4ab9deb96cff2cee146a3f9607f369d0d0e87b00;p=lugaru.git diff --git a/Source/Texture.cpp b/Source/Texture.cpp index 08010c3..dd2d1cc 100644 --- a/Source/Texture.cpp +++ b/Source/Texture.cpp @@ -74,8 +74,8 @@ void TextureRes::bind() glBindTexture(GL_TEXTURE_2D, id); } -TextureRes::TextureRes(const string& _filename, bool _hasMipmap, bool _hasAlpha): - id(0), filename(_filename), hasMipmap(_hasMipmap), hasAlpha(_hasAlpha), isSkin(false), +TextureRes::TextureRes(const string& _filename, bool _hasMipmap): + id(0), filename(_filename), hasMipmap(_hasMipmap), isSkin(false), skinsize(0), data(NULL), datalen(0) { load(); @@ -83,7 +83,7 @@ TextureRes::TextureRes(const string& _filename, bool _hasMipmap, bool _hasAlpha) } TextureRes::TextureRes(const string& _filename, bool _hasMipmap, GLubyte* array, int* skinsizep): - id(0), filename(_filename), hasMipmap(_hasMipmap), hasAlpha(false), isSkin(true), + id(0), filename(_filename), hasMipmap(_hasMipmap), isSkin(true), skinsize(0), data(NULL), datalen(0) { load(); @@ -104,10 +104,10 @@ TextureRes::~TextureRes() } } -void Texture::load(const string& filename, bool hasMipmap, bool hasAlpha) +void Texture::load(const string& filename, bool hasMipmap) { destroy(); - tex = new TextureRes(filename, hasMipmap, hasAlpha); + tex = new TextureRes(filename, hasMipmap); } void Texture::load(const string& filename, bool hasMipmap, GLubyte* array, int* skinsizep)