[5/5] WineD3D: Use flags instead of bools to control shader_hw_sample

Stefan Dösinger stefandoesinger at gmx.at
Sun Jun 14 12:30:21 CDT 2009


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.



More information about the wine-devel mailing list