From b10040b69bebe0759e7ff66a4e4e1bbd07c868a8 Mon Sep 17 00:00:00 2001 From: grumbel Date: Sun, 6 Dec 2009 22:35:11 +0000 Subject: [PATCH] Added mipmapping, but disabled it, as it leads to some unwanted blurriness git-svn-id: http://supertux.lethargik.org/svn/supertux/trunk/supertux@6188 837edb03-e0f3-0310-88ca-d4d4e8b29345 --- src/video/gl/gl_texture.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/video/gl/gl_texture.cpp b/src/video/gl/gl_texture.cpp index f9fa1b2a3..ca56a9800 100644 --- a/src/video/gl/gl_texture.cpp +++ b/src/video/gl/gl_texture.cpp @@ -135,9 +135,20 @@ GLTexture::GLTexture(SDL_Surface* image) : { SDL_LockSurface(convert); } - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, texture_width, + + if (true) + { // no not use mipmaps + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, texture_width, texture_height, 0, sdl_format, GL_UNSIGNED_BYTE, convert->pixels); + } + else + { // build mipmaps + gluBuild2DMipmaps(GL_TEXTURE_2D, GL_RGBA, texture_width, + texture_height, sdl_format, + GL_UNSIGNED_BYTE, convert->pixels); + } + if(SDL_MUSTLOCK(convert)) { SDL_UnlockSurface(convert); -- 2.11.0