2015-01-22 13:22 GMT+01:00 Henri Verbeet <hverbeet(a)gmail.com>:
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.
Do you prefer I just unconditionally add the (void *) cast to MAP_GL_FUNCTION or still add the separate define and only cast there? For the records, the only other used function requiring a cast is glTexImageEXT, because of the GLenum <-> GLint internalformat mismatch.