1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-19 13:51:14 +00:00

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
This commit is contained in:
reimar 2005-09-12 15:15:28 +00:00
parent 7a84b40ce4
commit 28ee54a940

View File

@ -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);
}