Mercurial > mplayer.hg
changeset 15719:e040252b8370
Fix OSD handling, DVD subtitles work now. Will be a bit slower though.
author | reimar |
---|---|
date | Mon, 13 Jun 2005 20:09:05 +0000 |
parents | 8bfe32bc0b74 |
children | e999d58f94fd |
files | libvo/vo_gl.c |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libvo/vo_gl.c Mon Jun 13 18:17:25 2005 +0000 +++ b/libvo/vo_gl.c Mon Jun 13 20:09:05 2005 +0000 @@ -152,8 +152,6 @@ glFindFormat(format, &image_bytes, &gl_texfmt, &gl_format, &gl_type); image_bytes = (image_bytes + 7) / 8; - if (use_osd) - sub_bg_alpha = 255; // We need alpha = 255 for invisible part of the OSD int_pause = 0; panscan_init(); @@ -270,6 +268,7 @@ unsigned char *src, unsigned char *srca, int stride) { + int i; // initialize to 8 to avoid special-casing on alignment int sx = 8, sy = 8; GLfloat xcov, ycov; @@ -306,8 +305,10 @@ GL_LUMINANCE, GL_UNSIGNED_BYTE, clearTexture); glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, scale_type); glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, scale_type); + for (i = 0; i < h * stride; i++) + clearTexture[i] = ~(-srca[i]); glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, w, h, GL_ALPHA, - GL_UNSIGNED_BYTE, srca); + GL_UNSIGNED_BYTE, clearTexture); #endif glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); glAdjustAlignment(image_width * image_bytes);