diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-03-02 20:51:17 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-03-02 20:51:17 +0300 |
commit | 6d51edf278effec3145d4036712cda7a2a5b0aef (patch) | |
tree | 6a7f15df97695766ac1d69cc07fe2c1bd680ef35 | |
parent | 1933978cb800c2348e8891c69b28e85c9417b32d (diff) | |
download | manaplus-6d51edf278effec3145d4036712cda7a2a5b0aef.tar.gz manaplus-6d51edf278effec3145d4036712cda7a2a5b0aef.tar.bz2 manaplus-6d51edf278effec3145d4036712cda7a2a5b0aef.tar.xz manaplus-6d51edf278effec3145d4036712cda7a2a5b0aef.zip |
Move texture settings.
-rw-r--r-- | src/resources/image.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/resources/image.cpp b/src/resources/image.cpp index 1e2bd6b51..c63fcab99 100644 --- a/src/resources/image.cpp +++ b/src/resources/image.cpp @@ -765,15 +765,16 @@ Image *Image::_GLload(SDL_Surface *tmpImage) if (SDL_MUSTLOCK(tmpImage)) SDL_LockSurface(tmpImage); + glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + glTexParameteri(mTextureType, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(mTextureType, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + glTexImage2D(mTextureType, 0, 4, tmpImage->w, tmpImage->h, 0, GL_RGBA, GL_UNSIGNED_BYTE, tmpImage->pixels); #ifdef DEBUG_OPENGL_LEAKS textures_count ++; #endif - glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); - glTexParameteri(mTextureType, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(mTextureType, GL_TEXTURE_MAG_FILTER, GL_NEAREST); if (SDL_MUSTLOCK(tmpImage)) SDL_UnlockSurface(tmpImage); |