PDA

View Full Version : gluTessCallback (OpenGL SuperBible)



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

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

Any help with this would be appreciated! :)

david_f_knight
10-22-2010, 12:15 PM
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.

mfort
10-23-2010, 03: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, 05:17 AM
Got it working. Thanx for the help! :)