View Full Version : gluTessCallback compile error on OSX

07-02-2006, 01:19 PM
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:

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

static void CALLBACK vertexCallback(GLdouble *vertex)
glVertex3dv((GLdouble *)vertex);

What must the callback and the call to gluTessCallback look like?

07-02-2006, 01:56 PM
first, you should not cross post.
This question is appropriate in the beginner section. Maybe on the Mac specific too, but only post once, thanks.
See http://www.flipcode.com/articles/article_tesselating.shtml

07-02-2006, 02:22 PM
Sorry, but the info in the link you send did not work I still get error

07-02-2006, 03:24 PM
"Still get error" is not informative.
- what code you used this time ?
- what error you got ?
- at which line ?

If you want to be helped, you seriously need to read and understand this :

07-02-2006, 08:08 PM
Being abusive will not get you the help you need

The link provided works fine for me

07-02-2006, 10:41 PM
Did you compile it in XCode?