display lists and evaluators

Hi,
does someone know whether there are any problems in using glEvalCoord1* (or glEvalCoord2*) if I call them inside a display list? It seems that it does not work.
If I call glEvalCoord* after calling of glCallList() (i.e. outside of display list) it does work and the curves or surfaces are really drawn. Is there some restriction in using glEvalCoord* inside of display lists?

Thanks in advance!

Alex

Evaluators generate coordinates that can be stored inside a display list, but you cannot actually execute an evaulator inside a display list, the display is a static list of OpenGL “commands” that will be executed to render something.

Mikael

So what is the conclusion? The calling of glEvalCoord* is completely useless inside of display lists? How can I access the coordinates generated by evaluators in order to store them (the coordinates) in a display list?

You can creat a display list and call the evaulator to store the generated information in the display list, then the evaluator is no longer needed as you can just use the display list to render the result.

Thank you for your suggestions!
But I still don’t understand how the coordinates should be stored. An example would be the best explanation. Suppose I have the following code:

glNewList(iList,GL_COMPILE);
for (i=0;i<=100;++i)
  glEvalCoord1f((GLfloat) i/100.0);
glEndList();

… and then somewhere

glCallList(iList);

Do you think this will work? Of course first of all I will define the control points, call glMap1f and glEnable.

Alex

Yes it will work, the evaluator will do it’sthing and call the correct openGL function for you, and the values will be stored in the display list.

So when you call the display list it will be “played back” as if you would have executed the avaluator again.

Mikael