On 21 January 2015 at 18:32, Matteo Bruni <mbruni(a)codeweavers.com> wrote:
+ typedef void (WINE_GLAPI *gl_shader_source_type)(GLuint, GLsizei, const GLchar * const *, const GLint*); + ... + #define MAP_GL_FUNCTION_CAST(core_func, cast, ext_func) \ + do \ + { \ + if (!gl_info->gl_ops.ext.p_##core_func) \ + gl_info->gl_ops.ext.p_##core_func = (cast)gl_info->gl_ops.ext.p_##ext_func; \ + } while (0) ... + MAP_GL_FUNCTION_CAST(glShaderSource, gl_shader_source_type, glShaderSourceARB); I'm not sure that's really much better than just adding a (void *) cast.