Jump to content
  • Advertisement
Sign in to follow this  
Mantear

Display List performance issue

This topic is 4252 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

Greetings! I've recently added the flexibility to my models of being able to change their drawing modes on the fly (direct, display list, vertex array, or VBO). Everything is working as expected, almost. Direct is the slowest (33-34 fps), followed by VAs (143-144 fps), VBOs (144-145 fps) and Display Lists (146-147 fps). However, I run into a problem when my 'picking' code runs. Whenever I mouse event happens (movement and/or clicks) I render a special scene where every object is drawn with a unique color. I then use glReadPixels() to find what color the mouse saw when the event happened to know what object to apply the event to. This works just fine in Direct, VA, and VBO mode. However, I get a severe drop in performance in Display List mode. If I move the mouse around as ast as I can, this will cause the most passes of the picking scene to be rendered. In VA and VBO modes, I drop down to just over 100 fps. But in Display List mode I drop down to just over 30. Why could be causing this? I will provide code of sections that people need to help analyze this issue, but right now I'm not sure what section(s) would be relevent to post.

Share this post


Link to post
Share on other sites
Advertisement
Are you recompling your display lists every time you draw the picking scene?
Or are you maintaining two lists for every object - one for normal draw and another for pick mode?

You also should note that there are not that many cases where you should prefer display lists today. Normally VAs and VBOs (especially VBOs) are your way to go.
In some OpenGL versions (OpenGL ES for example) display lists are dropped altogether.

Share this post


Link to post
Share on other sites
I maintain two lists for every object in Display List mode, one for a full render and a scaled down version for picking.

I'm supporting display lists more as an exercise than anything else. However, they do offer some performance increase (albeit a very small amount), so I'd like to keep the option available. I'm curious as to what I'm doing wrong. Perhaps display lists aren't as well supported anymore and I'm hitting a case that the driver developers either didn't test or simply don't care enough.

Share this post


Link to post
Share on other sites
Well, just as I about had all the source code inserted into this post, I found the problem. I was indeed inadvertantly re-creating the display lists each time the picking objects were to be drawn.

Thanks for the help!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!