mirror of
https://github.com/mpv-player/mpv
synced 2025-03-01 11:50:48 +00:00
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:
parent
36dd71db3c
commit
7a84b40ce4
@ -284,8 +284,9 @@ static void getFunctions() {
|
|||||||
* \param val luminance value to fill texture with
|
* \param val luminance value to fill texture with
|
||||||
*/
|
*/
|
||||||
void glCreateClearTex(GLenum target, GLenum fmt, GLint filter,
|
void glCreateClearTex(GLenum target, GLenum fmt, GLint filter,
|
||||||
int w, int h, char val) {
|
int w, int h, unsigned char val) {
|
||||||
GLfloat border[4] = {val, val, val, val};
|
GLfloat fval = (GLfloat)val / 255.0;
|
||||||
|
GLfloat border[4] = {fval, fval, fval, fval};
|
||||||
GLenum clrfmt = (fmt == GL_ALPHA) ? GL_ALPHA : GL_LUMINANCE;
|
GLenum clrfmt = (fmt == GL_ALPHA) ? GL_ALPHA : GL_LUMINANCE;
|
||||||
char *init = (char *)malloc(w * h);
|
char *init = (char *)malloc(w * h);
|
||||||
memset(init, val, w * h);
|
memset(init, val, w * h);
|
||||||
|
@ -65,7 +65,7 @@ int glFindFormat(uint32_t format, uint32_t *bpp, GLint *gl_texfmt,
|
|||||||
GLenum *gl_format, GLenum *gl_type);
|
GLenum *gl_format, GLenum *gl_type);
|
||||||
int glFmt2bpp(GLenum format, GLenum type);
|
int glFmt2bpp(GLenum format, GLenum type);
|
||||||
void glCreateClearTex(GLenum target, GLenum fmt, GLint filter,
|
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,
|
void glUploadTex(GLenum target, GLenum format, GLenum type,
|
||||||
const char *data, int stride,
|
const char *data, int stride,
|
||||||
int x, int y, int w, int h, int slice);
|
int x, int y, int w, int h, int slice);
|
||||||
|
Loading…
Reference in New Issue
Block a user