[MPlayer-cvslog] CVS: main/libvo gl_common.c,1.20,1.21

Reimar Döffinger CVS syncmail at mplayerhq.hu
Mon Sep 12 17:15:30 CEST 2005


CVS change done by Reimar Döffinger CVS

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

Modified Files:
	gl_common.c 
Log Message:
Use GL_CLAMP_TO_EDGE instead of GL_CLAMP to avoid border texels being sampled.
This avoids some ugly effects when vo_gl2 uses multiple textures.
(Note to self: read the specs instead of just copying the old code!).


Index: gl_common.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/gl_common.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- gl_common.c	12 Sep 2005 14:51:30 -0000	1.20
+++ gl_common.c	12 Sep 2005 15:15:28 -0000	1.21
@@ -296,8 +296,10 @@
   glTexParameterf(target, GL_TEXTURE_PRIORITY, 1.0);
   glTexParameteri(target, GL_TEXTURE_MIN_FILTER, filter);
   glTexParameteri(target, GL_TEXTURE_MAG_FILTER, filter);
-  glTexParameteri(target, GL_TEXTURE_WRAP_S, GL_CLAMP);
-  glTexParameteri(target, GL_TEXTURE_WRAP_T, GL_CLAMP);
+  glTexParameteri(target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+  glTexParameteri(target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+  // Border texels should not be used with CLAMP_TO_EDGE
+  // We set a sane default anyway.
   glTexParameterfv(target, GL_TEXTURE_BORDER_COLOR, border);
   free(init);
 }




More information about the MPlayer-cvslog mailing list