glutTimerFunc issues

后端 未结 2 1705
一整个雨季
一整个雨季 2021-01-25 15:10

I am using a timer function to animate, but I am having issues when I place it in the Renderer class.

void Renderer::animate(int value)
{
 glutTimerFunc(TIMERMSE         


        
2条回答
  •  遇见更好的自我
    2021-01-25 15:53

    glutTimerFunc() expects a pointer to a function of type void (*func)(int value), not a member function of type void (Renderer::*func)(int value).

    Make Render::animate static or use a global function.

提交回复
热议问题