Jump to content
  • Advertisement
Sign in to follow this  
Sophisto

OpenGL OpenGL / GLUT - Command to quit console window?

This topic is 3681 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

I'm currently creating a program using OpenGL and GLUT. All works fine, and I've just created a pop-up menu that allows the user to perform some actions. However, I'd like to include the option to quit the program from the menu, but I'm not sure on the command used. Can anyone help? All other aspects of the program / menu work fine, just not sure on what command to use to quit/exit the window. Cheers, S

Share this post


Link to post
Share on other sites
Advertisement
i am very new to this, but i think you just return 1;
i.e
if(!b)
{
MessageBox(NULL,L"failed to load bitmap",L"Hello",MB_OK);
return 1;
}

Share this post


Link to post
Share on other sites
Quote:
Original post by Sophisto
However, I'd like to include the option to quit the program from the menu, but I'm not sure on the command used. Can anyone help? All other aspects of the program / menu work fine, just not sure on what command to use to quit/exit the window.
Use exit(0).

Share this post


Link to post
Share on other sites
Quote:
Original post by swiftcoder
Quote:
Original post by Sophisto
However, I'd like to include the option to quit the program from the menu, but I'm not sure on the command used. Can anyone help? All other aspects of the program / menu work fine, just not sure on what command to use to quit/exit the window.
Use exit(0).



Worked a treat! Thanks, man!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!