Help about Gl Nurbs in display lists and M.Kilgard molehill example

Hi,
I’ve a problem concerning Nurbs in Opengl, especially:
Nurbs renders correctly when they are NOT in a display list
Nurbs does not renders correctly when they are in a display lists
Moreover the molehill.c example from Mark Kilgard’s book “Opengl programming for the XWindow system” does not display correctly.
I’m using glut 3.7 and red hat 8.
Any suggestions?

Thanks in advance.

The molehill example uses the GLU nurbs tessalator that in turn uses the OpenGL evaluator interface (glEval* routines).

Sounds like your OpenGL implementation doesn’t display list glEval* routines correctly. You mention GLUT 3.7 and Red Hat 8, but not your OpenGL implementation and version. I’m guessing it might be Mesa.

Honestly, I’m not sure the molehill example is that interesting these days. Few OpenGL implementations tune the OpenGL evalutor interface. And the GLU nurbs routines are usable, but not that fast. Please don’t take the molehill example too seriously (don’t make a mountain out of a molehill – could not resist).

I hope this helps.

  • Mark

I understood, but is there another method to put a Nurb in a display list?
In other words how can I optimize Nurbs displaying?
Thank you very much

Well can’t you just do:

//Generate the lists

glNewList(base,GL_COMPILE);

//Render all the nurbs here

glEndList();

And when you need to render them do:

glCallList(base);

No, the problem is with that method NURB does not display correctly so I’m searching for an alternative method.

I’ve found it!
The problem was in the property GLU SAMPLING TOLERANCE.
If I comment the line
gluNurbsProperty(Nurb,GLU_SAMPLING_TOLERANCE, 25.0)it works.

Maybe I’ve not understood this property?