View Full Version : fullscreen mode in glut problem

02-04-2009, 03:29 PM
this is the code :
int main (int argc, char **argv) {
glutInit (&argc, argv);
glutInitDisplayMode (GLUT_DOUBLE | GLUT_DEPTH); //set the display to Double buffer, with depth
glutGameModeString( "800x600:32@75" ); //the settings for fullscreen mode

the code works fine on my computer but when i run the same program on my laptop it goes into 1280x1024 screen instead of 800x600


02-05-2009, 03:11 AM
I am pretty sure glutgamemode can not change the monnitor refresh rate. Try without it, or set it to the same value as the current value before running the program. You laptop probably is at 60Hz.

02-07-2009, 10:56 PM
glutGameModeString( "800x600:32@60" );
man that was buggin the crap outta me. problem solved,thank you.

02-08-2009, 06:15 AM
This looks very weird. How can me make glut programs that run in fullscreen without knowing the refresh rate of the monitor on which it will run ? (meaning how to do fullscreen glut for everybody but not only yourself).

02-08-2009, 08:58 AM
Skip the @60 or @75 hz ! Then glut will keep the current value and will only restrict to the other parameters, it is explained in the doc.
glutGameModeString( "800x600:32" ); // will do
Anyway, don't use glut for fullscreen. It was really not meant for games anyways.
Something like GLFW http://glfw.sourceforge.net/ is much better in this area, still opensource (and more liberay than glut), still multiplateform, and easy to use (in fact easier than glut).

02-11-2009, 03:59 AM
Thanks !