summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/context_cocoa.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-06-14 10:35:43 +0200
committerwm4 <wm4@nowhere>2016-06-14 10:35:43 +0200
commit788929e4e07e00325cc1b2f58569db9de1ba47fb (patch)
tree7f29822cd0e439a0626f4ecf8fcee651bb129a99 /video/out/opengl/context_cocoa.c
parent3682df2dd50313812aadaec92f554b3d60dadc30 (diff)
downloadmpv-788929e4e07e00325cc1b2f58569db9de1ba47fb.tar.bz2
mpv-788929e4e07e00325cc1b2f58569db9de1ba47fb.tar.xz
vo_opengl: use standard functions to retrieve display depth
Until now, we've used system-specific API (GLX, EGL, etc.) to retrieve the depth of the default framebuffer. (We equal this to display depth and use the determined depth for dithering.) We can actually retrieve this value through standard GL API, and it works everywhere (except GLES 2 of course). This simplifies everything a great deal. egl_helpers.c is empty now. But I expect that some EGL boilerplate will be moved to it, so don't remove it yet.
Diffstat (limited to 'video/out/opengl/context_cocoa.c')
-rw-r--r--video/out/opengl/context_cocoa.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/video/out/opengl/context_cocoa.c b/video/out/opengl/context_cocoa.c
index 271bdb7444..ea7a9b535f 100644
--- a/video/out/opengl/context_cocoa.c
+++ b/video/out/opengl/context_cocoa.c
@@ -33,14 +33,6 @@ static int set_swap_interval(int enabled)
return (err == kCGLNoError) ? 0 : -1;
}
-static int cgl_color_size(struct MPGLContext *ctx)
-{
- struct cgl_context *p = ctx->priv;
- GLint value;
- CGLDescribePixelFormat(p->pix, 0, kCGLPFAColorSize, &value);
- return value > 16 ? 8 : 5;
-}
-
static void *cocoa_glgetaddr(const char *s)
{
void *ret = NULL;
@@ -123,7 +115,6 @@ static bool create_gl_context(struct MPGLContext *ctx, int vo_flags)
CGLSetParameter(p->ctx, kCGLCPSurfaceOpacity, &(GLint){0});
mpgl_load_functions(ctx->gl, (void *)cocoa_glgetaddr, NULL, ctx->vo->log);
- ctx->gl->fb_r = ctx->gl->fb_g = ctx->gl->fb_b = cgl_color_size(ctx);
CGLReleasePixelFormat(p->pix);