glutGameModeString - sets the game mode configuration via a string.
glutGameModeString glutGameModeString(string) -> None
void glutGameModeString(const char *string);
string ASCII string for selecting a game mode configu-
ration.
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 con- figuration string can also specify a window system depen- dent display mode. The string is a list of zero or more capability descrip- tions 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 compara- tor 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 configu- ration. The criteria are matched in strict left to right order of precdence. That is, the first specified criteria (left- most) takes precedence over the later criteria for non- exact criteria (greater than, less than, etc. compara- tors). 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: = Equal. != Not equal. < Less than and preferring larger difference (the least is best). > Greater than and preferring larger differences (the most is best). <= Less than or equal and preferring larger differ- ence (the least is best). >= Greater than or equal and preferring more instead of less. This comparator is useful for allocating resources like color precsion or depth buffer pre- cision where the maximum precison is generally preferred. Contrast with the tilde (~) comprator. ~ Greater than or equal but preferring less instead of more. This compartor is useful for allocating resources such as stencil bits or auxillary color buffers where you would rather not over allocate. The valid capability names are: bpp Bits per pixel for the frame buffer. height Height of the screen in pixels. hertz Video refresh rate of the screen in hertz. num Number of the window system depenedent display mode configuration. width Width of the screen in pixels. 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 descrip- tion can be mixed with conventional capability descrip- tions. The compact screen resolution description format is as follows: [ width "x" height ][ ":" bitsPerPixel ][ "@" videoRate ] Unspecifed capability descriptions will result in unspeci- fied criteria being generated. These unspecified criteria help glutGameModeString behave sensibly with terse game mode description strings.
Mark J. Kilgard (mjk@nvidia.com)
:: Documentation :: References :: GLUT ::
:: Index (n/a) ::