Tao.FreeGlut SDK Documentation

Glut.glutEnterGameMode Method 

Enters GLUT's game mode.

[Visual Basic]
Public Shared Function glutEnterGameMode() As Integer
[C#]
public static int glutEnterGameMode();

Return Value

This is defined in the header as an int, however, from the documentation that I've seen, I believe it should be a void. You should check your game mode state after entering game mode with: glutGameModeGet passing appropriate parameters.

Remarks

glutEnterGameMode is designed to enable high-performance fullscreen GLUT rendering, possibly at a different screen display format. Calling glutEnterGameMode 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.

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.

The following GLUT routines are ignored in game mode:

glutEnterGameMode 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 glutEnterGameMode 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.

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.

Game mode cannot be entered while pop-up menus are in use.

Note that the glutEnterGameMode and glutFullScreen routines operate differently. glutFullScreen simply makes the current window match the size of the screen. glutFullScreen does not change the screen display format and does not disable any GLUT features such as pop-up menus; glutFullScreen continues to operate in a "windowed" mode of operation. glutEnterGameMode creates a new window style, possibly changes the screen display mode, limits GLUT functionality, and hides other applications.

See Also

Glut Class | Tao.FreeGlut Namespace | glutGameModeGet | glutGameModeString | glutInitDisplayString | glutLeaveGameMode