# HG changeset patch # User reimar # Date 1370815430 0 # Node ID b67bdb9304f8c8f364cf92009f9e57dc4f077e73 # Parent c528b4f82e8b3901e05f1bfe95159309d155377f Change hack to use a solution that will work more generally. The main reason is that matrixview vo has similar issues, and single buffering seems like a bad idea for that one. diff -r c528b4f82e8b -r b67bdb9304f8 libvo/vo_gl.c --- a/libvo/vo_gl.c Sun Jun 09 21:34:24 2013 +0000 +++ b/libvo/vo_gl.c Sun Jun 09 22:03:50 2013 +0000 @@ -701,16 +701,6 @@ is_xyz = IMGFMT_IS_XYZ(image_format); glFindFormat(format, NULL, &gl_texfmt, &gl_format, &gl_type); - if (glctx.type == GLTYPE_OSX && vo_doublebuffering && !is_yuv) { - // doublebuffering causes issues when e.g. drawing yuy2 or rgb textures - // (nothing is draw) unless using glfinish which makes things slow. - // This is possibly because we do not actually request a double-buffered - // context. - // However single-buffering causes slowdown and artefacts when - // drawing planar formats. Mostly tested on PPC MacMini - mp_msg(MSGT_VO, MSGL_INFO, "[gl] -double not supported on OSX for interleaved formats, switching to -nodouble\n"); - vo_doublebuffering = 0; - } vo_flipped = !!(flags & VOFLAG_FLIPPING); if (create_window(d_width, d_height, flags, title) < 0) @@ -908,6 +898,13 @@ do_render_osd(RENDER_OSD | RENDER_EOSD); } if (use_glFinish) mpglFinish(); + else if (glctx.type == GLTYPE_OSX && vo_doublebuffering && !is_yuv) + // At least on PPC Mac Mini this combination leads to + // no image at all being show, however for the planar YUV + // case the flush causes a significant slowdown. + // Note that always using single-buffering is not a good solution since + // it causes artefacts with planar YUV. + mpglFlush(); if (vo_doublebuffering) { glctx.swapGlBuffers(&glctx);