X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FTexture.cpp;h=7fb4b94609740f7ba55e8ad4ac2119ea7f981f54;hb=757fd9c1ec8d263225df90ef486051712f448483;hp=dd2d1cc63ff0e0b7760bcfa4bb7324c3ba8a35b0;hpb=8d45019f2b1ac74108ae4589333680158fee32d5;p=lugaru.git diff --git a/Source/Texture.cpp b/Source/Texture.cpp index dd2d1cc..7fb4b94 100644 --- a/Source/Texture.cpp +++ b/Source/Texture.cpp @@ -21,6 +21,7 @@ along with Lugaru. If not, see . #include "gamegl.h" #include "Texture.h" #include "ImageIO.h" +#include "Utils/Folders.h" using namespace std; @@ -33,7 +34,7 @@ void TextureRes::load() ImageRec texture; //load image into 'texture' - load_image(ConvertFileName(filename.c_str()), texture); + load_image(filename.c_str(), texture); skinsize = texture.sizeX; GLuint type = GL_RGBA; @@ -107,13 +108,13 @@ TextureRes::~TextureRes() void Texture::load(const string& filename, bool hasMipmap) { destroy(); - tex = new TextureRes(filename, hasMipmap); + tex = new TextureRes(Folders::getResourcePath(filename), hasMipmap); } void Texture::load(const string& filename, bool hasMipmap, GLubyte* array, int* skinsizep) { destroy(); - tex = new TextureRes(filename, hasMipmap, array, skinsizep); + tex = new TextureRes(Folders::getResourcePath(filename), hasMipmap, array, skinsizep); } void Texture::destroy()