Display List performance issue

Started by
3 comments, last by Mantear 17 years, 2 months ago
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.
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.
If I was helpful, feel free to rate me up ;)If I wasn't and you feel to rate me down, please let me know why!
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.
So, could you post your selection code (using display lists) and your display list creation code?
If I was helpful, feel free to rate me up ;)If I wasn't and you feel to rate me down, please let me know why!
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!

This topic is closed to new replies.

Advertisement