Mercurial > mplayer.hg
changeset 16461:f93eaa5ad64d
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!).
author | reimar |
---|---|
date | Mon, 12 Sep 2005 15:15:28 +0000 |
parents | ec7036dedee4 |
children | fce59530dcfd |
files | libvo/gl_common.c |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libvo/gl_common.c Mon Sep 12 14:51:30 2005 +0000 +++ b/libvo/gl_common.c Mon Sep 12 15:15:28 2005 +0000 @@ -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); }