<refentry id="glutEnterGameMode.3GLUT">
	<refmeta id="glutEnterGameMode.3GLUT-meta">
		<refentrytitle>glutEnterGameMode</refentrytitle>
		<manvolnum>3GLUT</manvolnum>
	</refmeta>
	<refnamediv id="glutEnterGameMode.3GLUT-name">
		<refname>glutEnterGameMode</refname>
		<refname>glutLeaveGameMode</refname>
		<refpurpose>enters and leaves GLUT's game mode.</refpurpose>
	</refnamediv>
	<refsynopsisdiv id="glutEnterGameMode.3GLUT-c_spec">
		<title>C Specification</title>
		<funcsynopsis>
			<funcprototype>
				<funcdef>int&nbsp;<function>glutEnterGameMode</function></funcdef>
				<void/>
			</funcprototype>
			<funcprototype>
				<funcdef>void&nbsp;<function>glutLeaveGameMode</function></funcdef>
				<void/>
			</funcprototype>
		</funcsynopsis>
	</refsynopsisdiv>
	<refsect1 id="glutEnterGameMode.3GLUT-description">
		<title>Description</title>
		<para>
			<function>glutEnterGameMode</function> is designed to enable high-performance fullscreen GLUT rendering, possibly at a
			different screen display format. Calling <function>glutEnterGameMode</function> creates a special fullscreen GLUT
			window (with its own callbacks and OpenGL rendering context state). If the game mode string describes a possible screen
			display format, GLUT also changes the screen display format to the one described by the game mode string.
			<function>glutLeaveGameMode</function> leaves the GLUT game mode and returns the screen display format to its default
			format.
		</para>
		<para>
			When game mode is entered, certain GLUT functionality is disable to facilitate high-performance fullscreen rendering.
			GLUT pop-up menus are not available while in game mode. Other created windows and subwindows are not displayed in GLUT
			game mode. Game mode will also hide all other applications running on the computer's display screen. The intent of
			these restrictions is to eliminate window clipping issues, permit screen display format changes, and permit fullscreen
			rendering optimization such as page flipping for fullscreen buffer swaps.
		</para>
		<para>
			The value returned by <function>glutEnterGameMode</function> is a unique small integer identifier for the fullscreen
			window. The range of allocated identifiers starts at one. This window identifier can be used when calling <function
			moreinfo="refentry">glutSetWindow</function>.
		</para>
		<para>
			After leaving game mode, the GLUT functionality disabled in game mode is available again. The game mode window (and its
			OpenGL rendering state) is destroyed when leaving game mode. Any windows and subwindows created before entering the
			game mode are displayed in their previous locations. The OpenGL state of normal GLUT windows and subwindows is not
			disturbed by entering and/or leaving game mode.
		</para>
		<para>
			The following GLUT routines are ignored in game mode: <function moreinfo="refentry">glutFullScreen</function>,
			<function moreinfo="refentry">glutSetWindowTitle</function>, <function moreinfo="refentry">glutSetIconTitle</function>,
			<function moreinfo="refentry">glutPositionWindow</function>, <function
			moreinfo="refentry">glutReshapeWindow</function>, <function moreinfo="refentry">glutPopWindow</function>, <function
			moreinfo="refentry">glutPushWindow</function>, <function moreinfo="refentry">glutIconifyWindow</function>, <function
			moreinfo="refentry">glutShowWindow</function>, <function moreinfo="refentry">glutHideWindow</function>.
		</para>
		<para>
			<function>glutEnterGameMode</function> can be called when already in game mode. This will destroy the previous game
			mode window (including any OpenGL rendering state) and create a new game mode window with a new OpenGL rendering
			context. Also if <function>glutEnterGameMode</function> is called when already in game mode and if the game mode string
			has changed and describes a possible screen display format, the new screen display format takes effect. A reshape
			callback is generated if the game mode window changes size due to a screen display format change.
		</para>
		<para>
			Re-entering game mode provides a mechanism for changing the screen display format while already in game mode. Note
			though that the game mode window's OpenGL state is lost in this process and the application is responsible for
			re-initializing the newly created game mode window OpenGL state when re-entering game mode.
		</para>
		<para>
			Game mode cannot be entered while pop-up menus are in use.
		</para>
		<para>
			Note that the <function>glutEnterGameMode</function> and <function moreinfo="refentry">glutFullScreen</function>
			routines operate differently. <function moreinfo="refentry">glutFullScreen</function> simply makes the current window
			match the size of the screen. <function moreinfo="refentry">glutFullScreen</function> does not change the screen
			display format and does not disable any GLUT features such as pop-up menus; <function
			moreinfo="refentry">glutFullScreen</function> continues to operate in a &quot;windowed&quot; mode of operation.
			<function>glutEnterGameMode</function> creates a new window style, possibly changes the screen display mode, limits
			GLUT functionality, and hides other applications.
		</para>
	</refsect1>
	<refsect1 id="glutEnterGameMode.3GLUT-see_also">
		<title>See Also</title>
		<para>
			<simplelist type="inline">
				<member><citerefentry>
					<refentrytitle>glutGameModeGet</refentrytitle>
					<manvolnum>3GLUT</manvolnum>
				</citerefentry></member>
				<member><citerefentry>
					<refentrytitle>glutGameModeString</refentrytitle>
					<manvolnum>3GLUT</manvolnum>
				</citerefentry></member>
				<member><citerefentry>
					<refentrytitle>glutInitDisplayString</refentrytitle>
					<manvolnum>3GLUT</manvolnum>
				</citerefentry></member>
			</simplelist>
		</para>
	</refsect1>
</refentry>
