[MPlayer-cvslog] CVS: main/libvo gl_common.c, 1.19, 1.20 gl_common.h, 1.14, 1.15
Reimar Döffinger CVS
syncmail at mplayerhq.hu
Mon Sep 12 16:51:32 CEST 2005
CVS change done by Reimar Döffinger CVS
Update of /cvsroot/mplayer/main/libvo
In directory mail:/var2/tmp/cvs-serv28837
Modified Files:
gl_common.c gl_common.h
Log Message:
Fix border color (forgot to divide by 255.0).
Index: gl_common.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/gl_common.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- gl_common.c 9 Sep 2005 17:08:26 -0000 1.19
+++ gl_common.c 12 Sep 2005 14:51:30 -0000 1.20
@@ -284,8 +284,9 @@
* \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);
Index: gl_common.h
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/gl_common.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- gl_common.h 25 Aug 2005 12:45:57 -0000 1.14
+++ gl_common.h 12 Sep 2005 14:51:30 -0000 1.15
@@ -65,7 +65,7 @@
GLenum *gl_format, GLenum *gl_type);
int glFmt2bpp(GLenum format, GLenum type);
void glCreateClearTex(GLenum target, GLenum fmt, GLint filter,
- int w, int h, char val);
+ int w, int h, unsigned char val);
void glUploadTex(GLenum target, GLenum format, GLenum type,
const char *data, int stride,
int x, int y, int w, int h, int slice);
More information about the MPlayer-cvslog
mailing list