PDA

View Full Version : display lists and evaluators



amaltsev
10-09-2005, 06:50 AM
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

mikael_aronsson
10-09-2005, 10:29 AM
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

amaltsev
10-09-2005, 11:49 AM
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?

mikael_aronsson
10-09-2005, 08:53 PM
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.

amaltsev
10-09-2005, 10:12 PM
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

mikael_aronsson
10-12-2005, 02:20 AM
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