Hello,
I'm using C++ with OpenGL and GLUT. But I'm having problems with
callbacks.
There is a function called "glutDisplayFunc" which receives function
pointers as input, specifically "void (*func)(void)".
I'm calling the function inside the constructor of a class called
GLTestOne, and the input I am giving is to the function "void
GLTestOne::DrawGLScene()".
When I call the function, I use:
glutDisplayFunc(DrawGLScene)
.... however, the compiler complains that the pointer is of type "void
(GLTestOne::)(void)" instead of the required "void (*)(void".
How can I do this correctly? I'm still quite hazy with member function
pointers.
Cheers