static bool config_window_cocoa(struct MPGLContext *ctx, int flags) { struct cgl_context *p = ctx->priv; if (p->ctx == NULL) if (!create_gl_context(ctx)) return false; if (!ctx->gl->SwapInterval) ctx->gl->SwapInterval = set_swap_interval; vo_cocoa_config_window(ctx->vo, flags); return true; }
static bool config_window_cocoa(struct MPGLContext *ctx, int flags) { int rv = vo_cocoa_config_window(ctx->vo, flags, ctx->requested_gl_version >= MPGL_VER(3, 0)); if (rv != 0) return false; mpgl_load_functions(ctx->gl, (void *)vo_cocoa_glgetaddr, NULL, ctx->vo->log); ctx->depth_r = vo_cocoa_cgl_color_size(ctx->vo); ctx->depth_g = vo_cocoa_cgl_color_size(ctx->vo); ctx->depth_b = vo_cocoa_cgl_color_size(ctx->vo); if (!ctx->gl->SwapInterval) ctx->gl->SwapInterval = vo_cocoa_swap_interval; vo_cocoa_register_gl_clear_callback(ctx->vo, ctx->gl, gl_clear); return true; }
static int cocoa_reconfig(struct MPGLContext *ctx) { vo_cocoa_config_window(ctx->vo); return 0; }