glutEnterGameMode



glutEnterGameMode

NAME
SYNTAX
DESCRIPTION
SEE ALSO
AUTHOR

NAME

glutEnterGameMode, glutLeaveGameMode - enters and leaves GLUT’s game mode.

SYNTAX

void glutEnterGameMode(void);
void glutLeaveGameMode(void);

DESCRIPTION

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. glutLeaveGameMode leaves the GLUT game mode and returns the screen display format to its default format.

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.

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.

The following GLUT routines are ignored in game mode: glutFullScreen, glutSetWindowTitle, glutSetIconTitle, glutPositionWindow, glutReshapeWindow, glutPopWindow, glutPushWindow, glutIconifyWindow, glutShowWindow, glutHideWindow.

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

glutGameModeGet, glutGameModeString, glutInitDisplayString

AUTHOR

Mark J. Kilgard (mjk@nvidia.com)






Opportunity


Personal Opportunity - Free software gives you access to billions of dollars of software at no cost. Use this software for your business, personal use or to develop a profitable skill. Access to source code provides access to a level of capabilities/information that companies protect though copyrights. Open source is a core component of the Internet and it is available to you. Leverage the billions of dollars in resources and capabilities to build a career, establish a business or change the world. The potential is endless for those who understand the opportunity.

Business Opportunity - Goldman Sachs, IBM and countless large corporations are leveraging open source to reduce costs, develop products and increase their bottom lines. Learn what these companies know about open source and how open source can give you the advantage.





Free Software


Free Software provides computer programs and capabilities at no cost but more importantly, it provides the freedom to run, edit, contribute to, and share the software. The importance of free software is a matter of access, not price. Software at no cost is a benefit but ownership rights to the software and source code is far more significant.


Free Office Software - The Libre Office suite provides top desktop productivity tools for free. This includes, a word processor, spreadsheet, presentation engine, drawing and flowcharting, database and math applications. Libre Office is available for Linux or Windows.





Free Books


The Free Books Library is a collection of thousands of the most popular public domain books in an online readable format. The collection includes great classical literature and more recent works where the U.S. copyright has expired. These books are yours to read and use without restrictions.


Source Code - Want to change a program or know how it works? Open Source provides the source code for its programs so that anyone can use, modify or learn how to write those programs themselves. Visit the GNU source code repositories to download the source.





Education


Study at Harvard, Stanford or MIT - Open edX provides free online courses from Harvard, MIT, Columbia, UC Berkeley and other top Universities. Hundreds of courses for almost all major subjects and course levels. Open edx also offers some paid courses and selected certifications.


Linux Manual Pages - A man or manual page is a form of software documentation found on Linux/Unix operating systems. Topics covered include computer programs (including library and system calls), formal standards and conventions, and even abstract concepts.