summaryrefslogtreecommitdiffstats
path: root/libvo/gl_common.c
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2011-12-17 20:47:15 +0100
committerUoti Urpala <uau@mplayer2.org>2012-04-26 21:03:10 +0300
commit768e06b0ac3d11e5383b2e6e90f7b99719ba5876 (patch)
treef1063122f34c9d429f1da3a75acc9b3e87805a01 /libvo/gl_common.c
parentd12b9b611aa7030047e6556714e859dd2bfd38fc (diff)
downloadmpv-768e06b0ac3d11e5383b2e6e90f7b99719ba5876.tar.bz2
mpv-768e06b0ac3d11e5383b2e6e90f7b99719ba5876.tar.xz
vo_corevideo: restructure this video output
Restructure this video output to be similar to vo_gl, even if simpler and less feature complete (for example it's still missing EOSD support). Ideally, it should act as a decent fallback in the case where something breaks in the OSX support of vo_gl. Here's a summary of what changed: * Remove the shared buffer code since it wasn't using any function from the CoreVideo API. Moreover, its presence in vo_corevideo was forcing the non-GUI related code to perform more image copies than necessary. Equivalent shared-buffer functionality will be added in a separate new VO in the next commit (this means OSX GUIs will need to specify a different VO). * Clean up the code to conform a bit more to the mplayer2 conventions. Enforce 80 column wrapping, use a private struct for file variables, use the new libvo api. * Add OSD rendering using OpenGL instead of writing directly on the video image data. * Simplify the logic for the rendering function when dealing with panscan. * Add VOCTRL_REDRAW_FRAME support. * Add colormatrix support by using the built-in API provided by CoreVideo.
Diffstat (limited to 'libvo/gl_common.c')
-rw-r--r--libvo/gl_common.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libvo/gl_common.c b/libvo/gl_common.c
index 9245811911..30ed50e95e 100644
--- a/libvo/gl_common.c
+++ b/libvo/gl_common.c
@@ -350,6 +350,7 @@ static const extfunc_desc_t extfuncs[] = {
DEF_FUNC_DESC(TexParameterf),
DEF_FUNC_DESC(TexParameterfv),
DEF_FUNC_DESC(TexCoord2f),
+ DEF_FUNC_DESC(TexCoord2fv),
DEF_FUNC_DESC(Vertex2f),
DEF_FUNC_DESC(Vertex3f),
DEF_FUNC_DESC(Normal3f),
@@ -595,6 +596,9 @@ int glFmt2bpp(GLenum format, GLenum type)
return 4 * component_size;
case GL_RED:
return component_size;
+ case GL_RG:
+ case GL_LUMINANCE_ALPHA:
+ return 2 * component_size;
}
return 0; // unknown
}