diff options
author | wm4 <wm4@nowhere> | 2015-12-19 11:56:19 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-12-19 14:14:12 +0100 |
commit | 3394d37b4ea6876c0a4484c51ba23e6b8ed08e5a (patch) | |
tree | 95e646d22bb8ca0ffb28e9c5850a1241739da8ec /video/out/opengl/cocoa.c | |
parent | d2baaaa7df87eba9566fb935eeab5bd0af80fe1b (diff) | |
download | mpv-3394d37b4ea6876c0a4484c51ba23e6b8ed08e5a.tar.bz2 mpv-3394d37b4ea6876c0a4484c51ba23e6b8ed08e5a.tar.xz |
vo_opengl: refactor how framebuffer depth is passed from backends
Store the determined framebuffer depth in struct GL instead of
MPGLContext. This means gl_video_set_output_depth() can be removed, and
also justifies adding new fields describing framebuffer/backend
properties to struct GL instead of having to add more functions just to
shovel the information around.
Keep in mind that mpgl_load_functions() will wipe struct GL, so the
new fields must be set before calling it.
Diffstat (limited to 'video/out/opengl/cocoa.c')
-rw-r--r-- | video/out/opengl/cocoa.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/opengl/cocoa.c b/video/out/opengl/cocoa.c index 5e98fce8a1..8a3c3721fa 100644 --- a/video/out/opengl/cocoa.c +++ b/video/out/opengl/cocoa.c @@ -127,8 +127,8 @@ static bool create_gl_context(struct MPGLContext *ctx, int vo_flags) if (vo_flags & VOFLAG_ALPHA) CGLSetParameter(p->ctx, kCGLCPSurfaceOpacity, &(GLint){0}); - ctx->depth_r = ctx->depth_g = ctx->depth_b = cgl_color_size(ctx); 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); |