From 4a8486f8440ac70186f6e5bb0d5dcbef4ffe4f43 Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 3 Apr 2010 20:31:03 +0000 Subject: [PATCH] Try to detect and work around broken glXGetProcAddress on at least PPC OS X 10.4. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30994 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/gl_common.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libvo/gl_common.c b/libvo/gl_common.c index 476613d92a..3408fb2996 100644 --- a/libvo/gl_common.c +++ b/libvo/gl_common.c @@ -1768,6 +1768,12 @@ static int setGlWindow_x11(MPGLContext *ctx) 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