From 7011c8eddfdf1b12a1249e01323db57f05e0334e Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Sun, 22 Jul 2012 20:50:45 +0200 Subject: 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. --- src/resources/image.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/resources/image.cpp') 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); -- cgit v1.2.3-60-g2f50