Mercurial > mplayer.hg
changeset 16437:9dda08ef3e7c
Set texture border color to avoid weird border colors in some rare cases.
author | reimar |
---|---|
date | Fri, 09 Sep 2005 17:08:26 +0000 |
parents | 31c643d16626 |
children | 871e94131840 |
files | libvo/gl_common.c |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libvo/gl_common.c Fri Sep 09 16:43:18 2005 +0000 +++ b/libvo/gl_common.c Fri Sep 09 17:08:26 2005 +0000 @@ -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); }