PDA

View Full Version : "WHAT IS IN A DISPLAY LIST ?"



SurGL
11-18-2001, 10:12 PM
Now I understand that I was wrong when I thought ,am comfortable in display lists.

I wanted to implement a sofware version of display list for the sample "OpenGL like library" being develped as part of work.

What exactly does a display list contain?

a. IS it just gl commands in sequence, which can be strored in memory?
b.IS it vertices after transformations or ligting?

I have seen some implementations which just stores the gl command in display list. In this cases where does the performance advantage come from?

I would appreciate your views.
Thanks
SurGL

mikael_aronsson
11-18-2001, 10:53 PM
Hi !

A display list usually contains the result of an OpenGL command, not the command itself, this means that most of the time, some work can be done at compile time instead of execution time, and that's where you get some of the speed, also if there is enough video ram the display list can be stored in there and that means much faster execution time as we don't need to send to data to the video card.

Mikael

SurGL
11-18-2001, 11:18 PM
Thanks, but i am not yet close to it.
say I have
NewList Test
{
glLoadIdentity();
glTranslatef(10.0f,0.0f,0.0f);
glBegin(GL_POINTS);
glVertex3f(0,10,0);
glEnd();
}
EndList
What does Display List hold?
As Mr.Mikael explained, which results it hold. you mean, the result of matrix transformation?.
What result it hold for glBegin() commands.
Thanks
Suresh

Bob
11-18-2001, 11:51 PM
When you can the list, it will set the active matrix stack to identity, translate the current matrix, and draw a point. That displaylist will have different behaviour depending on what matrix stack is active when you call the list.