fullscreen mode in glut problem

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


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.

glutGameModeString( “800x600:32@60” );
man that was buggin the crap outta me. problem solved,thank you.

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

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

Thanks !