summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-03-02 20:51:17 +0300
committerAndrei Karas <akaras@inbox.ru>2012-03-02 20:51:17 +0300
commit6d51edf278effec3145d4036712cda7a2a5b0aef (patch)
tree6a7f15df97695766ac1d69cc07fe2c1bd680ef35
parent1933978cb800c2348e8891c69b28e85c9417b32d (diff)
downloadmv-6d51edf278effec3145d4036712cda7a2a5b0aef.tar.gz
mv-6d51edf278effec3145d4036712cda7a2a5b0aef.tar.bz2
mv-6d51edf278effec3145d4036712cda7a2a5b0aef.tar.xz
mv-6d51edf278effec3145d4036712cda7a2a5b0aef.zip
Move texture settings.
-rw-r--r--src/resources/image.cpp7
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);