Hi,guys:
I have to ask for your help now. There is a link error when I use function point. this is the code:
gluTessCallback(tess, GLU_TESS_BEGIN , glBegin); //(errored)
gluTessCallback(tess, GLU_TESS_VERTEX, glVertex3dv); //(errored)
gluTessCallback(tess, GLU_END, glEnd);
gluTessBeginPolygon(tess, (GLvoid *)0);
And the function defined as:
void gluTessCallback(
GLUtesselator * tess,
GLenum which,
void (* fn)( )
);
glBegin and glVertex3dv are the funs in OpenGL API, defined as :
void glBegin(
GLenum mode
);
void glEnd(
void
);
void glVertex4dv(
const GLdouble *v
);
I writed these codes in a C project and compiled no error. But in a MFC project, it can not be compiled, and the error message is :
error C2664: ‘gluTessCallback’ : 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
Please help me have a look,
Thanks,