I keep getting the following error when trying to compile the following tessellation code in XCode on OS X:
error: initializing argument 3 of ‘void gluTessCallback(GLUtesselator*, GLenum, GLvoid()(…))’
error: invalid conversion from 'GLvoid()()’ to ‘GLvoid (*)(…)’
my call back function is declared as follows and I am using the following code to register it:
e
gluTessCallback(tess, GLU_BEGIN, (GLvoid () (void)) glBegin );
gluTessCallback(tess, GLU_VERTEX, (GLvoid (CALLBACK) ()) &glVertex3dv );
gluTessCallback(tess, GLU_END, (GLvoid (CALLBACK*) ()) &glEnd );
gluTessCallback(tess, GLU_TESS_COMBINE, (GLvoid (CALLBACK*) ()) &combineCallback );
gluTessCallback(tess, GLU_ERROR, (GLvoid (CALLBACK*) ()) &errorCallback );
#ifndef CALLBACK
#define CALLBACK
#endif
static void CALLBACK vertexCallback(GLdouble *vertex)
{
glVertex3dv((GLdouble *)vertex);
}
What must the callback and the call to gluTessCallback look like?