summaryrefslogtreecommitdiffstats
path: root/libvo/gl_common.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-09-12 14:51:30 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-09-12 14:51:30 +0000
commit7a84b40ce4bb720cd5fbfbe608b236875028cf09 (patch)
treeb5b335454fa5354af029305889c82f4ba2a3f717 /libvo/gl_common.c
parent36dd71db3c8c4a3748a415366de0c47847ba39cd (diff)
downloadmpv-7a84b40ce4bb720cd5fbfbe608b236875028cf09.tar.bz2
mpv-7a84b40ce4bb720cd5fbfbe608b236875028cf09.tar.xz
Fix border color (forgot to divide by 255.0).
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16461 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/gl_common.c')
-rw-r--r--libvo/gl_common.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libvo/gl_common.c b/libvo/gl_common.c
index 2842c2a468..5a888826fb 100644
--- a/libvo/gl_common.c
+++ b/libvo/gl_common.c
@@ -284,8 +284,9 @@ static void getFunctions() {
* \param val luminance value to fill texture with
*/
void glCreateClearTex(GLenum target, GLenum fmt, GLint filter,
- int w, int h, char val) {
- GLfloat border[4] = {val, val, val, val};
+ int w, int h, unsigned char val) {
+ GLfloat fval = (GLfloat)val / 255.0;
+ GLfloat border[4] = {fval, fval, fval, fval};
GLenum clrfmt = (fmt == GL_ALPHA) ? GL_ALPHA : GL_LUMINANCE;
char *init = (char *)malloc(w * h);
memset(init, val, w * h);