tesselator callback function in vc++

Tring to compile following code failed to show messages … “cannot convert parameter 3 from ‘void (unsigned int)’ to ‘void (__stdcall *)(void)’
None of the functions with this name in scope match the target type”

How can compile this successfully?

Thanks in advance.


GLUtesselator* tobj = gluNewTess();
gluTessCallback(tobj,GLU_TESS_VERTEX,glVertex3dv);

You have to typecast glVertex3dv as follow :

gluTessCallback(myTesselator,GLU_TESS_VERTEX_DATA,(void (__stdcall *) (void)) glVertex3dv);

Regards.

Eric