diff options
author | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2012-07-22 20:50:45 +0200 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2012-07-25 23:00:45 +0200 |
commit | 7011c8eddfdf1b12a1249e01323db57f05e0334e (patch) | |
tree | 17359b70889f28c2c896af2229c2db504e726290 /src/resources | |
parent | 96360d5041066b41861ab88750f9a66c97cd1837 (diff) | |
download | mana-7011c8eddfdf1b12a1249e01323db57f05e0334e.tar.gz mana-7011c8eddfdf1b12a1249e01323db57f05e0334e.tar.bz2 mana-7011c8eddfdf1b12a1249e01323db57f05e0334e.tar.xz mana-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.
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/image.cpp | 2 |
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); |