I am programming in C++ and have a problem when I try to tesselate irregular polygons. In the gluTessCallback routine everything is fine if I use OpenGL routines like glBegin, gl End or glVertex3dv. But if I try to create my own callback routine it won’t compile (using G++). It says the “function is not declared in this scope”.
THe compiler doesn’t like the callback function in the gluTessCallback routine or in its own declaration.
I have tried void* and CALLBACK* but neither works.
Should the callback function be a class member function? Or declared as a C style function?
Does anyone have a sample class I could use as a reference?