Advertisement Jump to content
Sign in to follow this  


This topic is 4583 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. I've tried calling glutSetOption(GLUT_ACTION_ON_WINDOW_CLOSE, GLUT_ACTION_CONTINUE_EXECUTION); or glutSetOption(GLUT_ACTION_ON_WINDOW_CLOSE, GLUT_ACTION_GLUTMAINLOOP_RETURNS); at the start of my program. Neither seems to change the default behaviour. I've also tried calling them immediately before and after calling glutCreateWindow, still no difference -- all windows close and glutMainLoop never returns. glutCloseFunc is called properly. I can keep the windows alive by calling glutMainLoop again in this callback but then I can't close any windows! If I add a glutDestroyWindow to the glutCloseFunc then I get an infinite loop. What I really want to do is continue execution of all remaining windows. A glutCloseFunc hack is acceptable. Surely someone's managed it.

Share this post

Link to post
Share on other sites
I use GLFW. It works almost exactly like GLUT, 'cept function names are a bit more different. I also noticed that it has more specifications you can make... but most importantly, you control the main loop! Like:
bool running = true;
running = glfwGetWindowParam(GLFW_OPENED);
Just stick that after the inits and when running returns false, you do all your stuff you want after the loop. But if you're doing fine with QGLWidgets, then by all means stick with it.


Share this post

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

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. 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!