[MPlayer-cvslog] CVS: main/libvo gl_common.c,1.18,1.19

Reimar Döffinger CVS syncmail at mplayerhq.hu
Fri Sep 9 19:08:29 CEST 2005


CVS change done by Reimar Döffinger CVS

Update of /cvsroot/mplayer/main/libvo
In directory mail:/var2/tmp/cvs-serv20740/libvo

Modified Files:
	gl_common.c 
Log Message:
Set texture border color to avoid weird border colors in some rare cases.


Index: gl_common.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/gl_common.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- gl_common.c	9 Sep 2005 15:54:09 -0000	1.18
+++ gl_common.c	9 Sep 2005 17:08:26 -0000	1.19
@@ -285,6 +285,7 @@
  */
 void glCreateClearTex(GLenum target, GLenum fmt, GLint filter,
                       int w, int h, char val) {
+  GLfloat border[4] = {val, val, val, val};
   GLenum clrfmt = (fmt == GL_ALPHA) ? GL_ALPHA : GL_LUMINANCE;
   char *init = (char *)malloc(w * h);
   memset(init, val, w * h);
@@ -296,6 +297,7 @@
   glTexParameteri(target, GL_TEXTURE_MAG_FILTER, filter);
   glTexParameteri(target, GL_TEXTURE_WRAP_S, GL_CLAMP);
   glTexParameteri(target, GL_TEXTURE_WRAP_T, GL_CLAMP);
+  glTexParameterfv(target, GL_TEXTURE_BORDER_COLOR, border);
   free(init);
 }
 




More information about the MPlayer-cvslog mailing list