undefine ?

I’ve got a simple question about NURBS.
If my code would look like this:

gluNurbsCallback(theNurb, GLU_NURBS_BEGIN, beginCallback);
gluNurbsCallback(theNurb, GLU_NURBS_VERTEX, vertexCallback);
gluNurbsCallback(theNurb, GLU_NURBS_NORMAL, normalCallback);
gluNurbsCallback(theNurb, GLU_NURBS_END, endCallback);

As compile it , the errors is : GLU_NURBS_BEGIN,GLU_NURBS_VERTEX,GLU_NURBS_NORMAL,GLU_NURBS_END are undefined. But the OpenGL version is 1.5.4581 in my computer.

Why ? Please give me some suggests, thanks .

GLU functions are not a part of the OpenGL implementation (GL). Your version number is from the GL_VERSION.
You can check gluGetString(GLU_VERSION) for the GLU version.

Microsoft’s VisualStudio documentation says only GLU_ERROR is supported in gluNurbsCallback:

which I interpret as that their outdated GLU 1.2 library implementation (glu.h, glu32.dll, glu32.lib) is not supporting this and the defines are from GLU version 1.3.

I don’t know if that’s available under Windows, but heard Linux is more up to date, maybe you find an implementation.

Ok, Where I can find this header file and lib ?

try this link :

it contains in /GLU 1.3/ :

Thanks a lot

Now , I have an another question.
My code would look like this:

void CALLBACK vertexCallback(GLfloat *vertex)
printf ("glVertex3f (%5.3f, %5.3f, %5.3f)
", vertex[0], vertex[1], vertex[2]);

gluNurbsCallback(theNurb, GLU_NURBS_VERTEX, vertexCallback);

As compile it, the error is : error C2664: “gluNurbsCallback” : can’t translate the parameter 3 from“void (GLenum)”to“_GLUfuncptr”.

In glu 1.3 Spec , the funtion “gluNrubsCallback” is defined as: void gluNrubsCallback(GLUnurbsObj *nobj,GLenum which,void (*fn)() ); , and the funtion “vertex” is defined as :void vertex(GLfloat *vertex);

Why , who can help me ?