]> git.jsancho.org Git - lugaru.git/blobdiff - Source/Texture.cpp
Got rid of global texture var. Calling load_image directly
[lugaru.git] / Source / Texture.cpp
index adbef9f7819403a8dcdc16c2fe0d4c56debdb563..08010c389f3ed0c84951e768edbf61424c8111ec 100644 (file)
@@ -24,15 +24,16 @@ along with Lugaru.  If not, see <http://www.gnu.org/licenses/>.
 
 using namespace std;
 
-extern ImageRec texture;
 extern bool trilinear;
 
 vector<TextureRes*> TextureRes::list;
 
 void TextureRes::load()
 {
-    //load image into 'texture' global var
-    upload_image(ConvertFileName(filename.c_str()));
+    ImageRec texture;
+
+    //load image into 'texture'
+    load_image(ConvertFileName(filename.c_str()), texture);
 
     skinsize = texture.sizeX;
     GLuint type = GL_RGBA;