PDA

View Full Version : OpenGL w/ glut



11-09-2000, 09:20 AM
Hi,

I wuz juz wondering if we can make fullscreen apps with glut. If so, please include a code snippet showing how to do so.

Thanx.

Glossifah
11-09-2000, 10:44 AM
glutFullScreen();


Of course, this assumes you've set up everything else (size, buffering mode, etc).

Does that help?

Glossifah

zed
11-09-2000, 11:04 AM
also as of glut3.7 theres a 'game mode' that does this as well a demo with source is included in the 3.7 distribution check under gameglut,asteroids (or something)

Rob The Bloke
11-09-2000, 07:35 PM
To use gameMode do one of two things,

when entering:

you need to pass a string to tell it what resolution and colour depth to use.

ie, glutGameModeString("640x480:16@60");

that gives the resolution, next the colour depth (16 24 or 32) and finally the refresh rate.

then you enter game mode:

glutEnterGameMode();

when exiting the program you must do the following, otherwise funny things will happen.

query whether the game mode is active. If it is then leave game mode.

if(glutGet(GLUT_GAME_MODE_ACTIVE)) glutLeaveGameMode();

you'll need to check the exact function calls but I think thats about right. Ensure that before you use it, you have a key or mouse press that will exit the program though!!!!

11-10-2000, 02:33 AM
Thank you guys for your responses. Really appreciate it.

Antonio
11-10-2000, 01:53 PM
Furthermore, don't forget that when using gamemode you need to register all the callbacks and opengl context again. The game mode window is a separate window with a different context.

Antonio www.fatech.com/tech (http://www.fatech.com/tech)