View Full Version : gluTessCallback Problem

Stack Overflow
01-20-2003, 01:14 PM

I am trying to get gluTessCallback to start working, but every time I try to execute my program it keep giving me an error that looks like this:

error C2664: 'gluTessCallback' : cannot convert parameter 3 from 'void (unsigned int)' to 'void (__stdcall *)(void)'

Has anyone had this problem before, and is there a way to fix it?

Edit: I also have this in my code.

#include <GL/glu.h>
#pragma comment( lib, "glu32.lib")

gluTessCallback(tobj, GLU_TESS_BEGIN, glBegin);
gluTessCallback(tobj, GLU_VERTEX, glVertex2fv);
gluTessCallback(tobj, GLU_END, glEnd);


[This message has been edited by VC6-OGL (edited 01-20-2003).]

01-20-2003, 01:50 PM
Just cast the function pointer to proper type.

gluTessCallback(tobj, GLU_TESS_BEGIN, reinterpret_cast<void (__stdcall *)(void)>(glBegin));

Stack Overflow
01-20-2003, 03:04 PM
Thank you very much Bob, it is working now!!! http://www.opengl.org/discussion_boards/ubb/smile.gif