gluTessCallback (OpenGL SuperBible)

Hello! I’m doing the example Florida from chapter 10. I’m trying to call the function gluTessCallback. This is how I and the author do it:

gluTessCallback(pTess, GLU_TESS_BEGIN, (CALLBACK)glBegin);

And CALLBACK is:


#ifndef WIN32
#define CALLBACK (GLvoid (*)(...))
#else
#define CALLBACK (GLvoid (__stdcall*)())
#endif

Since I’m running Win 7 64-bit I guess it chooses the latter one. Anyway, I’ve tried with both of the CALLBACKs, neither work.

If I use the first CALLBACK I get: syntax error: ‘)’. If I use the second one I get the previous error and that I miss a ‘)’, a bit weird. :wink:

Any help with this would be appreciated! :slight_smile:

You could use OpenGL 4 and skip all the gluTess functions altogether, and then also have all your tessellations be hardware accelerated with the programmable tessellation shader stage.

WIN32 is defined when compiling both 32 and 64bit applications. Your callback function should look like this:

void CALLBACK myBegin(GLenum type, void *data)
{
}

Got it working. Thanx for the help! :slight_smile: