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-23 08:21:40 +0200
commite26642fbd61fbc842d6f88c6f078a7ed16b14389 (patch)
tree4a003b4eb0d54b074d9a0926a3b4ac820317f9c4
parent9876be2200996c5005f45f87771e91c39d208796 (diff)
downloadmana-e26642fbd61fbc842d6f88c6f078a7ed16b14389.tar.gz
mana-e26642fbd61fbc842d6f88c6f078a7ed16b14389.tar.bz2
mana-e26642fbd61fbc842d6f88c6f078a7ed16b14389.tar.xz
mana-e26642fbd61fbc842d6f88c6f078a7ed16b14389.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.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/resources/image.cpp b/src/resources/image.cpp
index dbed38a2..975bd647 100644
--- a/src/resources/image.cpp
+++ b/src/resources/image.cpp
@@ -496,6 +496,7 @@ 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))