XVisualInfo* fgChooseVisual( void )
in the file src/freeglut_window.c, has a series of if
statements for each attribute. This will run faster
if written as a switch case for all combinations.
In other words:
John F. Fay
Logged In: YES
I appreciate where a single "switch" block would be faster than a series of "if" statements, but what is being tested in each "if" statement is the setting of a single bit in the "fg.DisplayMode" variable. To put every possible combination into a "switch" statement branch would require over a thousand different alternatives and is not practical.