[PATCH 4/5] wined3d: Prefer the core glActiveTexture function. (v2)
Henri Verbeet
hverbeet at gmail.com
Thu Jan 8 08:50:58 CST 2015
On 8 January 2015 at 15:07, Matteo Bruni <mbruni at codeweavers.com> wrote:
> + #define MAP_GL_FUNCTION(core_func, ext_func) \
> + { \
> + if (!gl_info->gl_ops.ext.p_##core_func) \
> + gl_info->gl_ops.ext.p_##core_func = gl_info->gl_ops.ext.p_##ext_func; \
> + }
> +
> + MAP_GL_FUNCTION(glActiveTexture, glActiveTextureARB);
> +#undef MAP_GL_FUNCTION
That probably works here in practice, but in general you want to avoid
defining macros like that. See e.g.
https://gcc.gnu.org/onlinedocs/cpp/Swallowing-the-Semicolon.html for
the explanation.
More information about the wine-devel
mailing list