Sign in to follow this  

Display Lists Slow

This topic is 4276 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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. :)

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites

This topic is 4276 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this