summaryrefslogtreecommitdiff
path: root/src/resources/image.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/image.cpp')
-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);