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

Thomas Guillem thomas at gllm.fr
Wed May 23 09:19:21 CEST 2018


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



More information about the vlc-devel mailing list