Re: [PATCH 3/6] wined3d: Introduce D3D7+ normal matrix computation.
23 Apr
2015
23 Apr
'15
11:52 a.m.
On 22 April 2015 at 19:30, Matteo Bruni <mbruni(a)codeweavers.com> wrote:
+#define SWAP_ROWS(a, b) { float *tmp = a; a = b; b = tmp; } + I assume this is mostly borrowed from Mesa like invert_matrix_3d(), but unfortunately Mesa isn't particularly good at writing macros, even though they have more than enough of them. This one happens to more or less work for the cases you have here, but consider the following in particular: if (...) SWAP_ROWS(a, b); else SWAP_ROWS(c, d); Please just use the standard "do { ... } while(0)" construction when you need to define a macro like that. In this particular case there's of course no reason you need a macro in the first place.
3887
Age (days ago)
3887
Last active (days ago)
0 comments
1 participants
participants (1)
-
Henri Verbeet