Threading with glut: glutPostRedisplay being ignored

I have a program which updates it the program output then the state of the program changes. This happens when a ticker of the time (not an openGL timer, one implemented in threads) happens, and when keyboard input is registered from glut (using glutKeyboardFunc callback).

Both of these events update the programs state and call glutPostRedisplay; the problem is only the when the keyboard is pressed does it actually do anything. When the timer ticks the display function is ignored, but when the keyboard is pressed the display function is called.

Does glut ignore other threads? And if so is there a way to get it to register them.


您不能从GLUT初始化的线程调用glutPostRedisplay或大多数其他GLUT函数。GLUT不是线程安全的。

链接地址: http://www.djcxy.com/p/38440.html

上一篇: 对于了解OpenGL的人

下一篇: 线程与glut:glutPostRedisplay被忽略