[vlc-devel] [PATCH 1/8] glx: make GLX_ARB_get_proc_address mandatory
Thomas Guillem
thomas at gllm.fr
Wed May 23 12:43:48 CEST 2018
On Wed, May 23, 2018, at 12:18, Rémi Denis-Courmont wrote:
> Err, this is a runtime feature. You can't test it at build time AFAIK.
It's already tested at build time. it just move the check to the opening
of the module.
>
> Le 23 mai 2018 10:19:21 GMT+03:00, Thomas Guillem <thomas at gllm.fr>
> a écrit :>> Since the GL display now depends on getProcAddress().
>>
>> ---
>>
>> modules/video_output/glx.c | 10 ++++------
>>
>> 1 file changed, 4 insertions(+), 6 deletions(-)
>>
>>
>>
>> diff --git a/modules/video_output/glx.c b/modules/video_output/glx.c
>>>> index cb5d53b7db..17188f24b2 100644
>>
>> --- a/modules/video_output/glx.c
>>
>> +++ b/modules/video_output/glx.c
>>
>> @@ -68,11 +68,7 @@ static void SwapBuffers (vlc_gl_t *gl)
>>
>> static void *GetSymbol(vlc_gl_t *gl, const char *procname)
>>
>> {
>>
>> (void) gl;
>>
>> -#ifdef GLX_ARB_get_proc_address
>>
>> return glXGetProcAddressARB ((const GLubyte *)procname);
>>
>> -#else
>>
>> - return NULL;
>>
>> -#endif
>>
>> }
>>
>>
>>
>> static bool CheckGLX (vlc_object_t *vd, Display *dpy)
>>
>> @@ -117,6 +113,10 @@ static int Open (vlc_object_t *obj)
>>
>> {
>>
>> vlc_gl_t *gl = (vlc_gl_t *)obj;
>>
>>
>>
>> +#ifndef GLX_ARB_get_proc_address
>>
>> + return VLC_EGENERIC;
>>
>> +#endif
>>
>> +
>>
>> if (gl->surface->type != VOUT_WINDOW_TYPE_XID || !vlc_xlib_init
>> (obj))
>>>> return VLC_EGENERIC;
>>
>>
>>
>> @@ -209,7 +209,6 @@ static int Open (vlc_object_t *obj)
>>
>> gl->swap = SwapBuffers;
>>
>> gl->getProcAddress = GetSymbol;
>>
>>
>>
>> -#ifdef GLX_ARB_get_proc_address
>>
>> bool is_swap_interval_set = false;
>>
>>
>>
>> MakeCurrent (gl);
>>
>> @@ -235,7 +234,6 @@ static int Open (vlc_object_t *obj)
>>
>> }
>>
>> # endif
>>
>> ReleaseCurrent (gl);
>>
>> -#endif
>>
>>
>>
>> /* XXX: Prevent other gl backends (like EGL) to be opened within
>> the same
>>>> * X11 window instance. Indeed, using EGL after GLX on the same
>> X11 window
>>>
> --
> Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez
> excuser ma brièveté.> _________________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20180523/a1a08135/attachment.html>
More information about the vlc-devel
mailing list