Excuting the rest of my programme around glutMainLoop?

可紊 提交于 2019-12-06 11:30:26

You could stop using GLUT. GLFW gives you better control over the loop, so that it's easier to do other processing.

If you insist on using GLUT, and you're using FreeGLUT, then you can use glutMainLoopEvent. This function processes one iteration of the main loop. So you can just stick it in an infinite loop and call it repeatedly. As part of that loop, you can do other things, like pulling data from the terminal or whatever.

freeglut offers glutMainLoopEvent, so you can choose your running mode.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!