changeset 30952:994f301a13f6

Try to detect and work around broken glXGetProcAddress on at least PPC OS X 10.4.
author reimar
date Sat, 03 Apr 2010 20:31:03 +0000
parents e76a4f6bfc8d
children d3f31670562d
files libvo/gl_common.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/gl_common.c	Sat Apr 03 19:58:06 2010 +0000
+++ b/libvo/gl_common.c	Sat Apr 03 20:31:03 2010 +0000
@@ -1768,6 +1768,12 @@
         appendstr(&glxstr, glXExtStr(mDisplay, GLX_EXTENSIONS));
 
     getFunctions(getProcAddress, glxstr);
+    if (!mpglGenPrograms && mpglGetString &&
+        getProcAddress != (void *)getdladdr &&
+        strstr(mpglGetString(GL_EXTENSIONS), "GL_ARB_vertex_program")) {
+      mp_msg(MSGT_VO, MSGL_WARN, "Broken glXGetProcAddress detected, trying workaround\n");
+      getFunctions((void *)getdladdr, glxstr);
+    }
     free(glxstr);
 
     // and inform that reinit is neccessary