This topic is now archived and is closed to further replies.


How do I use full screen in glut??

Recommended Posts

It depends on the version of GLUT you are using, if you are using below version 3.7 the only way to do fullscreen is to use the function glutFullscreen() but this only opens a screen with the properties of the desktop e.g. if your desktop was 1024x768 and colour depth was 32 bit then your fullscreen app would be this size.

With GLUT versions higher than 3.7 though there are a few new functions that you can use.
First you have to set up the properties of the window using this function:
void glutGameModeString(const char *string)
which has to be in the format of
"width x height : colorDepth @ refreshRate"
then you use the function:
int glutEnterGameMode(void) to actually open the window.
A little example here then:

int main(int argc, char** argv)
glutInit(&argc, argv);
//set up the render functions etc as you normally would

return 0;

hope that helps and that i wrote it all properly

If there''s an order in all of this disorder
is it like a tape recorder?
Can we rewind it just once more?

Share this post

Link to post
Share on other sites