summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-09-12 15:15:28 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-09-12 15:15:28 +0000
commit28ee54a9405b05464873efc68638620c11228788 (patch)
tree3e41fdfd58658231c3509d19ce2803633a58abb5 /libvo
parent7a84b40ce4bb720cd5fbfbe608b236875028cf09 (diff)
downloadmpv-28ee54a9405b05464873efc68638620c11228788.tar.bz2
mpv-28ee54a9405b05464873efc68638620c11228788.tar.xz
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!). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16462 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/gl_common.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libvo/gl_common.c b/libvo/gl_common.c
index 5a888826fb..33e478bcc5 100644
--- a/libvo/gl_common.c
+++ b/libvo/gl_common.c
@@ -296,8 +296,10 @@ void glCreateClearTex(GLenum target, GLenum fmt, GLint filter,
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);
}