Fix border color (forgot to divide by 255.0).

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16461 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2005-09-12 14:51:30 +00:00
parent 36dd71db3c
commit 7a84b40ce4
2 changed files with 4 additions and 3 deletions

View File

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

View File

@ -65,7 +65,7 @@ int glFindFormat(uint32_t format, uint32_t *bpp, GLint *gl_texfmt,
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);