[vlc-devel] [PATCH 2/2] opengl: Avoid getting GL symbols directly for GLES to avoid override

Thomas Guillem thomas at gllm.fr
Tue May 22 16:47:15 CEST 2018



On Tue, May 22, 2018, at 16:32, Paul Kocialkowski wrote:
> Since some gl-prefixed functions are common between GLES and GL, it may
> occur that these symbols get overridden when loading one library after
> the other. More specifically, it happens when loading video output
> modules (that use GLES) and the Qt interface (that may use GL instead of
> GLES) in that order. The video output calls to gl* functions then result
> in calls to their GL implementations, not GLES (and thus fails because
> of the missing context).
> 
> Getting the symbols from the GetSymbol callback of the windowing module
> ensures that we always get the right symbols.
> 
> Signed-off-by: Paul Kocialkowski <paul.kocialkowski at bootlin.com>
> ---
>  modules/video_output/opengl/vout_helper.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/modules/video_output/opengl/vout_helper.c b/modules/
> video_output/opengl/vout_helper.c
> index 56f5be7bc3..89aa40b802 100644
> --- a/modules/video_output/opengl/vout_helper.c
> +++ b/modules/video_output/opengl/vout_helper.c
> @@ -738,7 +738,7 @@ vout_display_opengl_t 
> *vout_display_opengl_New(video_format_t *fmt,
>  
>      vgl->gl = gl;
>  
> -#if defined(USE_OPENGL_ES2) || defined(HAVE_GL_CORE_SYMBOLS)
> +#if defined(HAVE_GL_CORE_SYMBOLS)

Fine with me,
But I need to test on Android and iOS.

Maybe we can define HAVE_GL_CORE_SYMBOLS for libegl_android_plugin to avoid possible regressions ?

>  #define GET_PROC_ADDR_CORE(name) vgl->vt.name = gl##name
>  #else
>  #define GET_PROC_ADDR_CORE(name) GET_PROC_ADDR_EXT(name, true)
> -- 
> 2.17.0
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list