I am using OpenGL with GLUI for building UI for my application.
I tried to add a button using the GLUI object glui and passed the callback function btnNext() to it.
glui->add_button(“Next”, 0, (GLUI_Update_CB)btnNext);
And the btnNext() is defined as
This is supposed to move the orbiter object(a sphere) by 1 unit.
But this is not working. Nothing happens on the onclick event of the button. Is this definition valid? Is it legal to call glutPostRedisplay() from inside a callback function?