[vlc-devel] [PATCH 1/8] glx: make GLX_ARB_get_proc_address mandatory

Rémi Denis-Courmont remi at remlab.net
Wed May 23 12:18:56 CEST 2018


Err, this is a runtime feature. You can't test it at build time AFAIK.

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
>-- 
>2.17.0
>
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel

-- 
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20180523/ecc69721/attachment.html>


More information about the vlc-devel mailing list