diff options
Diffstat (limited to 'video/out/opengl/libmpv_gl.c')
-rw-r--r-- | video/out/opengl/libmpv_gl.c | 31 |
1 files changed, 9 insertions, 22 deletions
diff --git a/video/out/opengl/libmpv_gl.c b/video/out/opengl/libmpv_gl.c index ae6ec66ca4..c297c138bb 100644 --- a/video/out/opengl/libmpv_gl.c +++ b/video/out/opengl/libmpv_gl.c @@ -25,7 +25,7 @@ static int init(struct libmpv_gpu_context *ctx, mpv_render_param *params) mpgl_load_functions2(p->gl, init_params->get_proc_address, init_params->get_proc_address_ctx, - init_params->extra_exts, ctx->log); + NULL, ctx->log); if (!p->gl->version && !p->gl->es) { MP_FATAL(ctx, "OpenGL not initialized.\n"); return MPV_ERROR_UNSUPPORTED; @@ -36,13 +36,12 @@ static int init(struct libmpv_gpu_context *ctx, mpv_render_param *params) p->ra_ctx->log = ctx->log; p->ra_ctx->global = ctx->global; p->ra_ctx->opts = (struct ra_ctx_opts) { - .probing = false, .allow_sw = true, }; static const struct ra_swapchain_fns empty_swapchain_fns = {0}; struct ra_gl_ctx_params gl_params = { - // vo_opengl_cb is essentially like a gigantic external swapchain where + // vo_libmpv is essentially like a gigantic external swapchain where // the user is in charge of presentation / swapping etc. But we don't // actually need to provide any of these functions, since we can just // not call them to begin with - so just set it to an empty object to @@ -55,25 +54,13 @@ static int init(struct libmpv_gpu_context *ctx, mpv_render_param *params) if (!ra_gl_ctx_init(p->ra_ctx, p->gl, gl_params)) return MPV_ERROR_UNSUPPORTED; - int debug; - mp_read_option_raw(ctx->global, "gpu-debug", &m_option_type_flag, &debug); - p->ra_ctx->opts.debug = debug; - p->gl->debug_context = debug; - ra_gl_set_debug(p->ra_ctx->ra, debug); - - ctx->ra = p->ra_ctx->ra; - - // Legacy API user loading for opengl-cb. Explicitly inactive for render API. - if (get_mpv_render_param(params, (mpv_render_param_type)-1, NULL) == - ctx->global && p->gl->MPGetNativeDisplay) - { - void *x11 = p->gl->MPGetNativeDisplay("x11"); - if (x11) - ra_add_native_resource(ctx->ra, "x11", x11); - void *wl = p->gl->MPGetNativeDisplay("wl"); - if (wl) - ra_add_native_resource(ctx->ra, "wl", wl); - } + struct ra_ctx_opts *ctx_opts = mp_get_config_group(ctx, ctx->global, &ra_ctx_conf); + p->ra_ctx->opts.debug = ctx_opts->debug; + p->gl->debug_context = ctx_opts->debug; + ra_gl_set_debug(p->ra_ctx->ra, ctx_opts->debug); + talloc_free(ctx_opts); + + ctx->ra_ctx = p->ra_ctx; return 0; } |