View Full Version : gluTessCallback (OpenGL SuperBible)

Unresolved External
10-22-2010, 02:39 AM
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);


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

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. ;)

Any help with this would be appreciated! :)

10-22-2010, 11:15 AM
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.

10-23-2010, 02:50 AM
WIN32 is defined when compiling both 32 and 64bit applications. Your callback function should look like this:

void CALLBACK myBegin(GLenum type, void *data)

Unresolved External
10-25-2010, 04:17 AM
Got it working. Thanx for the help! :)