- fixed texture edge problem
authorIngo Ruhnke <grumbel@gmx.de>
Mon, 2 Feb 2004 17:05:57 +0000 (17:05 +0000)
committerIngo Ruhnke <grumbel@gmx.de>
Mon, 2 Feb 2004 17:05:57 +0000 (17:05 +0000)
SVN-Revision: 112

src/texture.c

index 90ccd59..62171f9 100644 (file)
@@ -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);