Tesselator callbacks - Please help

I am trying to use OpenGL’s tesselator to triangulate a concave polygon.

I don’t want to use OpenGL to draw the polygon, just get the data.

Can anyone explain to me how to do this. I can’t get my callback functions to work.

typedef void (__stdcall *GluTessCallbackType)();

void __stdcall TriVertexData(GLdouble* vertex_data, CFrame* polygon_data){…}

GLUtesselator* tess = gluNewTess();
gluTessCallback(tess, GLU_TESS_END_DATA, reinterpret_cast<GluTessCallbackType>(TriEndData));
gluTessCallback(tess, GLU_TESS_VERTEX_DATA, reinterpret_cast<GluTessCallbackType>(TriVertexData));

gluTessBeginPolygon(tess, ArchitectureFrame);

for (k=0;k<points;k++){
  gluTessVertex(tess, Poly1Points[k],Poly1Points[k]);


Yes, AAMOF I sat, cursing VC++, the other day, and I did solve this.

You want to register them like so:

gluTessCallback (tobj, GLU_TESS_BEGIN, (GLvoid (CALLBACK *) ()) &TessBegin);

Do this, whatever your parameters may be.

Still no joy,
The code compiles and runs but my callbacks are not being called.

any ideas