From: Tobias Markus Date: Mon, 3 Mar 2014 17:24:31 +0000 (+0100) Subject: Fixing OpenGL compiler warning since Mavericks X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=22c497cff8b94f218046ae774976a4ec7537a3f5;p=supertux.git Fixing OpenGL compiler warning since Mavericks --- diff --git a/src/video/gl/gl_texture.cpp b/src/video/gl/gl_texture.cpp index 9e2b70dda..599fb68d3 100644 --- a/src/video/gl/gl_texture.cpp +++ b/src/video/gl/gl_texture.cpp @@ -138,17 +138,14 @@ GLTexture::GLTexture(SDL_Surface* image) : SDL_LockSurface(convert); } - if (true) - { // no not use mipmaps - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, texture_width, + 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); + + // no not use mipmaps + if(false) + { + glGenerateMipmap(GL_TEXTURE_2D); } if(SDL_MUSTLOCK(convert))