# HG changeset patch # User reimar # Date 1118693345 0 # Node ID e040252b837064071f1cdf771e07caeed9acf28c # Parent 8bfe32bc0b7409dc4b6b5de4bd9bb1a94cca9b28 Fix OSD handling, DVD subtitles work now. Will be a bit slower though. diff -r 8bfe32bc0b74 -r e040252b8370 libvo/vo_gl.c --- 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);