Am Sonntag, 14. Juni 2009 18:34:13 schrieb Tobias Jakobi:
Why not use an enum instead of the defines?
Because as far as I can see the other places that deal with flags use defines to define them, not an enum type. Specifically, I looked at the WINED3D_GLSL_SAMPLE_* flags, which have the equivalent job in glsl_shader.c
Besides that, using an enum for OR-able flags seems not quite right to me. If you have something like
enum flags { flag1 = 1; flag2 = 2; flag3 = 4; }
"flag1 | flag3" gives a value(=5) that does not exist in the enum.