View Full Version : How to use Callback fuction in gluTessCallback?

02-16-2004, 08:29 PM
Using Visual C++ 6.0, I attempted to compile a tessellation example with texturing. I am using the Visual C++ 6.0 compiler. When it tries to compile a gluTessCallback(tobj, GLU_TESS_VERTEX, (void (CALLBACK *)())Vertex ) statement, I get an error :
"error C2664: 'gluTessCallback' : cannot convert parameter 3 from 'void (void *)' to 'void (__stdcall *)(void)'
None of the functions with this name in scope match the target type"
here,"Vertex" in the statement is a Callback function defined by me:
void CSceneView::Vertex(void *xyz)
glTexCoord2dv((double*)xyz + 3);

The same code will compile and run fine using the C compiler. Has anyone encountered this problem? Please help me!

Tom Nuydens
02-16-2004, 11:52 PM
Moving to beginners forum...

-- Tom