gluTessCallback(tess, GLU_TESS_BEGIN, glBegin)Compile error

When I call gluTessCallback in a MFC project, it complined error:
cannot convert parameter 3 from ‘void (unsigned int)’ to ‘void (__stdcall *)(void)’

But in a c project, it compiled no error. How to correct it?
Thanks

How have you declared the function? with one parameter unsigned int? or without parameters (void)?

Hi !

You need to put a “void” also in front of each callback function, if you don’t specify a return type you get “int”.

Mikael