glutGameModeString sets the game mode configuration via an ASCII string. The game mode configuration string for GLUT's fullscreen game mode describes the suitable screen width and height in pixels, the pixel depth in bits, and the video refresh frequency in hertz. The game mode configuration string can also specify a window system dependent display mode.
The string is a list of zero or more capability descriptions seperated by spaces and tabs. Each capability description is a capability name that is followed by a comparator and a numeric value. (Unlike the display mode string specified using glutInitDisplayString, the comparator and numeric value are not optional.) For example, "width>=640" and "bpp=32" are both valid criteria.
The capability descriptions are translated into a set of criteria used to select the appropriate game mode configuration.
The criteria are matched in strict left to right order of precdence. That is, the first specified criteria (leftmost) takes precedence over the later criteria for non-exact criteria (greater than, less than, etc. comparators). Exact criteria (equal, not equal compartors) must match exactly so precedence is not relevant.
The numeric value is an integer that is parsed according to ANSI C's strtol(str, strptr, 0) behavior. This means that decimal, octal (leading 0), and hexidecimal values (leading 0x) are accepeted. The valid compartors are:
The valid capability names are:
An additional compact screen resolution description format is supported. This compact description convienently encodes the screen resolution description in a single phrase. For example, "640x480:16@60" requests a 640 by 480 pixel screen with 16 bits per pixel at a 60 hertz video refresh rate. A compact screen resolution description can be mixed with conventional capability descriptions.
The compact screen resolution description format is as follows:
[ width "x" height ][ ":" bitsPerPixel ][ "@" videoRate ]
Unspecifed capability descriptions will result in unspecified criteria being generated. These unspecified criteria help glutGameModeString behave sensibly with terse game mode description strings.