In the dispatch table, all functions are stored without the "m" prefix. Modify code so that OSMesaGetProcAddress works both with gl and mgl prefixes. Similar to https://lists.freedesktop.org/archives/mesa-dev/2015-September/095251.html --- mesa-11.1.2/src/mapi/glapi/glapi_getproc.c.bak 2016-01-18 08:39:26.000000000 +0100 +++ mesa-11.1.2/src/mapi/glapi/glapi_getproc.c 2016-04-18 11:35:19.000000000 +0200 @@ -62,12 +62,7 @@ GLuint i; for (i = 0; static_functions[i].Name_offset >= 0; i++) { const char *testName = gl_string_table + static_functions[i].Name_offset; -#ifdef MANGLE - /* skip the prefix on the name */ - if (strcmp(testName, n + 1) == 0) -#else if (strcmp(testName, n) == 0) -#endif { return &static_functions[i]; } @@ -516,15 +511,14 @@ init_glapi_relocs_once(); -#ifdef MANGLE - /* skip the prefix on the name */ - if (funcName[1] != 'g' || funcName[2] != 'l') - return NULL; -#else - if (funcName[0] != 'g' || funcName[1] != 'l') - return NULL; +#ifdef USE_MGL_NAMESPACE + if (funcName && funcName[0] == 'm') + funcName++; #endif + if (!funcName || funcName[0] != 'g' || funcName[1] != 'l') + return NULL; + /* search extension functions first */ func = get_extension_proc_address(funcName); if (func)