Jump to content
  • Advertisement


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


How do I use full screen in glut??

This topic is 5230 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, How do I get glut to show my drawn stuff in full screen mode?? [edited by - SuperDuck on March 21, 2004 8:18:52 AM]

Share this post

Link to post
Share on other sites
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

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!