Display lists have no effect

Hi,

I have been trying to create a program with display lists. though when I run it with and without display list it has no effect on my fps.

here is my code using just a cube

void cube
{
draw cube…
}

void dcube – this initializes my display list
{
begin display list

call cube function

end display list
}

void display
{
if dlist == true
use display list for cube
else
call cube function
}

is there anything else I should do?

draw something more complicated than a cube!
a cube is too simple to get a significant speed-up
with a display list. draw something about
10000 vertices to see a difference.

or drawn hundreds or thousands of your models with and without display lists.

Originally posted by jide:
or drawn hundreds or thousands of your models with and without display lists.
NO, this may even make things worse, the cube needs to have MANY vertices as RigidBody said.

Display lists are not generally optimized for trivial pieces of geometry.

Really ? Sorry for that. It was an idea in the case he wasn’t able (at this time) to have a model using thousands polygons.

Dorbie, how do you know that ? As far as I know, it’s not explained on the red book. Any locations explaining such constraints ? Thanx.

A display list is a compiled list of OpenGL commands that can be stored in the card. This is mainly useful to avoid the data transfert from cpu to gpu, but has a small fixed cost to call it.
So for millions of small display lists, the fixed cost kills the small gains.

correct me if i’m wrong, but afaik do display lists
not necessarily have to be stored in graphics card
memory.

Originally posted by ZbuffeR:
A display list is a compiled list of OpenGL commands that can be stored in the card.

I know that. This is the main functionnality of display lists though.

Originally posted by ZbuffeR:

This is mainly useful to avoid the data transfert from cpu to gpu, but has a small fixed cost to call it.
So for millions of small display lists, the fixed cost kills the small gains.

This logic is not very translucent to my point of view. What I know is that display lists are very good things for storing material properties for example. Materials are very little things (ambient, diffuse, specular and shininess almost only). Those display lists calls of materials can be repeated very often and for several up to many meshes…
So, this would have been a burden regarding the meanings you stippled and so I can’t understand why. Or does it mean what I think about display lists and materials is also false ?

Originally posted by RigidBody:

correct me if i’m wrong, but afaik do display lists
not necessarily have to be stored in graphics card
memory.

RigidBody, I think this is because we cannot ensure all graphic cards (and their drivers) will do so, or could do so. As an example, Mesa isn’t hardware, so I guess no or few things can be stored directly in the graphic card. But I might be wrong because Mesa display lists are somewhat powerful.

Hi Jide
OpenGL is a graphics server for your application.You send the OpenGL calls and it makes a picture based on these calls–Isn’t it?
Display lists can be stored in the server side and are ready to serve your application. In this case, you send one call-glCallList(s)-to the OpenGL and then it immediately does that work for you–Rather than processing many calls independently. In small apps, it is not clear .As an example is there any difference between the 80FPS and 79 FPS? But in full-blown applications, processing-sending- many calls --as an example 10000 calls-Is very different with processing 1 call.
-Ehsan-

sure. forget that all.

great, thanks!