From: Ingo Ruhnke Date: Mon, 2 Feb 2004 17:05:57 +0000 (+0000) Subject: - fixed texture edge problem X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=fc52ab84989228463be1111ba9c36ed9edbf9e79;p=supertux.git - fixed texture edge problem SVN-Revision: 112 --- diff --git a/src/texture.c b/src/texture.c index 90ccd5959..62171f9a4 100644 --- a/src/texture.c +++ b/src/texture.c @@ -115,6 +115,8 @@ void texture_create_gl(SDL_Surface * surf, GLint * tex) glEnable(GL_TEXTURE_2D); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glPixelStorei(GL_UNPACK_ROW_LENGTH, conv->pitch / conv->format->BytesPerPixel); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB10_A2, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, conv->pixels); glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);