summaryrefslogtreecommitdiffstats
path: root/libvo/gl_common.c
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2012-05-14 16:33:06 +0200
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2012-05-15 10:37:58 +0200
commit43337db0a49029da316157d9bc57e9c44e846e69 (patch)
tree4644c331af38cab4fa8de6a1f5468ec648c43afa /libvo/gl_common.c
parent4a2bd440dd71faf6852d3653de02fc512ce8244f (diff)
downloadmpv-43337db0a49029da316157d9bc57e9c44e846e69.tar.bz2
mpv-43337db0a49029da316157d9bc57e9c44e846e69.tar.xz
cocoa: gl3: support querying of colors bit depth
Add support for querying the bit depth of the colors from the OpenGL context. This allows to perform dithering correctly.
Diffstat (limited to 'libvo/gl_common.c')
-rw-r--r--libvo/gl_common.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libvo/gl_common.c b/libvo/gl_common.c
index cd618b443c..621bfa39a8 100644
--- a/libvo/gl_common.c
+++ b/libvo/gl_common.c
@@ -1727,6 +1727,9 @@ static int create_window_cocoa_gl3(struct MPGLContext *ctx, int gl_flags,
{
int rv = vo_cocoa_create_window(ctx->vo, d_width, d_height, flags, 1);
getFunctions(ctx->gl, (void *)vo_cocoa_glgetaddr, NULL, true);
+ ctx->depth_r = vo_cocoa_cgl_color_size();
+ ctx->depth_g = vo_cocoa_cgl_color_size();
+ ctx->depth_b = vo_cocoa_cgl_color_size();
return rv;
}