Display Lists Slow

Started by
8 comments, last by godmodder 18 years ago
Hey At the moment, before I move to use Vertex Arrays or anything I'm using Display lists. Well for the test I'm running at the moment there's just one display list and there's a small pause as the program is loading. However, I've just added a second and it's slowed it down dramatically. Is this normal?
Advertisement
Display lists can take longer to build but in return they generally execute faster than other techniques; this is usually considered a good trade-off. This may depend on the size of the dlist. Don't make them too big. :)
What do you mean by "...it's slowed it down dramatically." ?
Do not try to measure the speed by the fps. If you got 500fps with one displaylist and now get 200fps with two it means that the second displaylist just take 3 milliseconds to execute.
Gold:

Ok I assumed that's what was happening, but it slowed loading the program by like 10 seeconds. If i have 100's of models this is going to be a bit of a problem.

Kambiz:

Measuring in seconds how long it takes to load, not during execution.
Quote:Original post by AndyEsserOk I assumed that's what was happening, but it slowed loading the program by like 10 seeconds. If i have 100's of models this is going to be a bit of a problem.


Yikes, that's excessive. What graphics card is this? How big is the model?
MSDN:
"...Different OpenGL implementations buffer commands in several different locations, including network buffers and the graphics accelerator itself. The glFlush function empties all these buffers, causing all issued commands to be executed as quickly as they are accepted by the actual rendering engine..."

I don't know if this would help but try calling glFlush() (and maybe glFinish()) after each glEndList() maybe you are loading too many objects at the same time (even with just 2 objects).
No, that probably won't help. The problem probably has more to do with the model itself. How many polys are in the model? Is it very complex? How are you compiling your draw lists? Show us some code, there shouldn't be any reason that loading one extra model would add 10 seconds to your load time. The problem is more then likely somewhere else.

Post some of your loading code, specifically where you are loading the models and generating/creating the display lists.

EDIT: as a side note, it is also possible to have draw lists of vertex arrays. As long as your data is static this can improve performance (and is almost the same as using VBOs from a performance standpoint).
The model is only 6 quads, it's a small crate.

However, I believe i've actually found that the problem is elsewhere. I think it's to do with my texture loading because I started loading some other textures and realise done of them was like 2000x1000 pixels so that's probably what's slowing it down. But thanks for all your help guys!!

Much appreciated.
Loading large textures still shouldn't cause that much of a slow down. however the slowdown you're experiencing is probably because your textures aren't power of 2's. If you're using mip maps then this is going to be really slow because it has to convert your textures to a power of 2 and make the mip levels. Always make sure your textures are powers of 2. (2048x1024 in this case).
Just a side note,

display lists can actually be to bloated with data. It's best to pack batches of 4096 triangles (Geforce 6 series and up) in them and render those seperatly because the generation time suffers from 2^n complexity.

This topic is closed to new replies.

Advertisement