diff options
Diffstat (limited to 'video/out/gl_cocoa.c')
-rw-r--r-- | video/out/gl_cocoa.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/video/out/gl_cocoa.c b/video/out/gl_cocoa.c index 66c363f79a..d04983ee50 100644 --- a/video/out/gl_cocoa.c +++ b/video/out/gl_cocoa.c @@ -121,7 +121,9 @@ static bool create_gl_context(struct MPGLContext *ctx) return false; } - vo_cocoa_create_nsgl_ctx(ctx->vo, p->ctx); + vo_cocoa_set_opengl_ctx(ctx->vo, p->ctx); + CGLSetCurrentContext(p->ctx); + 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); @@ -149,7 +151,6 @@ static bool config_window_cocoa(struct MPGLContext *ctx, int flags) static void releaseGlContext_cocoa(MPGLContext *ctx) { struct cgl_context *p = ctx->priv; - vo_cocoa_release_nsgl_ctx(ctx->vo); CGLReleaseContext(p->ctx); } @@ -158,11 +159,6 @@ static void swapGlBuffers_cocoa(MPGLContext *ctx) vo_cocoa_swap_buffers(ctx->vo); } -static void set_current_cocoa(MPGLContext *ctx, bool current) -{ - vo_cocoa_set_current_context(ctx->vo, current); -} - void mpgl_set_backend_cocoa(MPGLContext *ctx) { ctx->priv = talloc_zero(ctx, struct cgl_context); @@ -172,5 +168,4 @@ void mpgl_set_backend_cocoa(MPGLContext *ctx) ctx->vo_init = vo_cocoa_init; ctx->vo_uninit = vo_cocoa_uninit; ctx->vo_control = vo_cocoa_control; - ctx->set_current = set_current_cocoa; } |