<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html
  PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd">
<html
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:mml="http://www.w3.org/1998/Math/MathML"
><head><title>glutGameModeString</title><link rel="stylesheet" href="style.css" type="text/css"/><meta name="generator" content="DocBook XSL Stylesheets V1.59.1"/><link rel="home" href="index.xml" title="PyOpenGL 2.0.1.07 Man Pages"/><link rel="up" href="reference-GLUT.xml" title="GLUT"/><link rel="previous" href="glutGameModeGet.3GLUT.xml" title="glutGameModeGet"/><link rel="next" href="glutGet.3GLUT.xml" title="glutGet"/></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">glutGameModeString</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="glutGameModeGet.3GLUT.xml">Prev</a> </td><th width="60%" align="center">GLUT</th><td width="20%" align="right"> <a accesskey="n" href="glutGet.3GLUT.xml">Next</a></td></tr></table><hr/></div><div class="refentry" lang="en"><a name="glutGameModeString.3GLUT"/><div class="titlepage"/><div class="refnamediv"><a name="glutGameModeString.3GLUT-name"/><h2>Name</h2><p>glutGameModeString &#8212; sets the game mode configuration via a string.</p></div><div class="refsynopsisdiv"><a name="glutGameModeString.3GLUT-c_spec"/><h2>C Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code>void <tt>glutGameModeString</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code>const char *<i><tt>string</tt></i>);</code></td></tr></table></div><div class="refsynopsisdiv"><a name="glutGameModeString.3GLUT-python_spec"/><h2>Python Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code><tt>glutGameModeString</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code><i><tt>string</tt></i>) &#8594; <tt>None</tt></code></td></tr></table></div><div class="refsect1" lang="en"><a name="glutGameModeString.3GLUT-parameters"/><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><i><tt>string</tt></i></span></dt><dd>
						ASCII string for selecting a game mode configuration.
					</dd></dl></div></div><div class="refsect1" lang="en"><a name="glutGameModeString.3GLUT-description"/><h2>Description</h2><p>
			<tt>glutGameModeString</tt> 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.
		</p><p>
			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 <a href="glutInitDisplayString.3GLUT.xml"><tt>glutInitDisplayString</tt></a>, the comparator and numeric value are
			<i><tt>not</tt></i> optional.) For example, "width&gt;=640" and "bpp=32" are both valid
			criteria.
		</p><p>
			The capability descriptions are translated into a set of criteria used to select the appropriate game mode
			configuration.
		</p><p>
			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.
		</p><p>
			The numeric value is an integer that is parsed according to ANSI C's <tt>strtol(str, strptr,
			0)</tt> behavior. This means that decimal, octal (leading 0), and hexidecimal values (leading 0x) are accepeted.
			The valid compartors are:
		</p><div class="variablelist"><dl><dt><span class="term">=</span></dt><dd>
						Equal.
					</dd><dt><span class="term">!=</span></dt><dd>
						Not equal.
					</dd><dt><span class="term">&lt;</span></dt><dd>
						Less than and preferring larger difference (the least is best).
					</dd><dt><span class="term">&gt;</span></dt><dd>
						Greater than and preferring larger differences (the most is best).
					</dd><dt><span class="term">&lt;=</span></dt><dd>
						Less than or equal and preferring larger difference (the least is best).
					</dd><dt><span class="term">&gt;=</span></dt><dd>
						Greater than or equal and preferring more instead of less. This comparator is useful for allocating
						resources like color precsion or depth buffer precision where the maximum precison is generally preferred.
						Contrast with the tilde (~) comprator.
					</dd><dt><span class="term">~</span></dt><dd>
						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.
					</dd></dl></div><p>
			The valid capability names are:
		</p><div class="variablelist"><dl><dt><span class="term"><span class="bold"><b>bpp</b></span></span></dt><dd>
						Bits per pixel for the frame buffer.
					</dd><dt><span class="term"><span class="bold"><b>height</b></span></span></dt><dd>
						Height of the screen in pixels.
					</dd><dt><span class="term"><span class="bold"><b>hertz</b></span></span></dt><dd>
						Video refresh rate of the screen in hertz.
					</dd><dt><span class="term"><span class="bold"><b>num</b></span></span></dt><dd>
						Number of the window system depenedent display mode configuration.
					</dd><dt><span class="term"><span class="bold"><b>width</b></span></span></dt><dd>
						Width of the screen in pixels.
					</dd></dl></div><p>
			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.
		</p><p>
			The compact screen resolution description format is as follows:
		</p><p>
			[ <span class="emphasis"><em>width</em></span> "x" <span class="emphasis"><em>height</em></span> ][ ":"
			<span class="emphasis"><em>bitsPerPixel</em></span> ][ "@" <span class="emphasis"><em>videoRate</em></span> ]
		</p><p>
			Unspecifed capability descriptions will result in unspecified criteria being generated. These unspecified criteria help
			<tt>glutGameModeString</tt> behave sensibly with terse game mode description strings.
		</p></div><div class="refsect1" lang="en"><a name="glutGameModeString.3GLUT-see_also"/><h2>See Also</h2><p>
			<span class="simplelist"><a href="glutGameModeGet.3GLUT.xml">glutGameModeGet</a>, <a href="glutEnterGameMode.3GLUT.xml">glutEnterGameMode</a>, <a href="glutLeaveGameMode.3GLUT.xml">glutLeaveGameMode</a>, <a href="glutInitDisplayString.3GLUT.xml">glutInitDisplayString</a></span>
		</p></div></div><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="glutGameModeGet.3GLUT.xml">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="reference-GLUT.xml">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="glutGet.3GLUT.xml">Next</a></td></tr><tr><td width="40%" align="left" valign="top">glutGameModeGet </td><td width="20%" align="center"><a accesskey="h" href="index.xml">Home</a></td><td width="40%" align="right" valign="top"> glutGet</td></tr></table></div></body></html>