summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-07-22 20:50:45 +0200
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-07-25 23:00:45 +0200
commit7011c8eddfdf1b12a1249e01323db57f05e0334e (patch)
tree17359b70889f28c2c896af2229c2db504e726290
parent96360d5041066b41861ab88750f9a66c97cd1837 (diff)
downloadmana-client-7011c8eddfdf1b12a1249e01323db57f05e0334e.tar.gz
mana-client-7011c8eddfdf1b12a1249e01323db57f05e0334e.tar.bz2
mana-client-7011c8eddfdf1b12a1249e01323db57f05e0334e.tar.xz
mana-client-7011c8eddfdf1b12a1249e01323db57f05e0334e.zip
Revert "Leave the default values for OpenGL texture filters"
This reverts commit 137ade7226af37d073a5755b90181275664dd65c. Turns out that when leaving the default values, the textures won't actually work since they are incomplete unless the mipmaps are generated (since GL_TEXTURE_MIN_FILTER is GL_NEAREST_MIPMAP_LINEAR by default). For now we don't want to generate mipmaps anyway since we're going for a pixely look, so revert the filters back to GL_NEAREST. The reason this had worked for me is because on my system the texture type GL_TEXTURE_RECTANGLE_ARB is used instead of GL_TEXTURE_2D and this texture type does not support mipmaps.
-rw-r--r--src/resources/image.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/resources/image.cpp b/src/resources/image.cpp
index a29d475d..975bd647 100644
--- a/src/resources/image.cpp
+++ b/src/resources/image.cpp
@@ -496,6 +496,8 @@ Image *Image::_GLload(SDL_Surface *tmpImage)
tmpImage->pixels);
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);