Re: [PATCH 4/5] wined3d: Prefer the core glActiveTexture function. (v2)
8 Jan
2015
8 Jan
'15
2:50 p.m.
On 8 January 2015 at 15:07, Matteo Bruni <mbruni(a)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.
3992
Age (days ago)
3992
Last active (days ago)
0 comments
1 participants
participants (1)
-
Henri Verbeet