View Full Version : DisplayList performance problem

Niels Jørgensen
10-23-2004, 02:05 AM

I have a weird performance problem with displaylists. I have searched the Red Book as well as this BB without getting any wiser, so here goes:

I'm creating and rendering a hierarchy of display lists. Each list represents a mesh which may have multiple different textures. The lists are generated with GL_COMPILE (*not* GL_COMPILE_AND_EXECUTE) and contains calls to:


In one particular scene there are just two meshes, one of wish is complex (1 instance) and another is pretty simple but has multiple texures (25 instances).

The problem is that I get (almost exactly) 10x better performance in immediate mode than when using DL.

I also do stencil shadows but disabling this does not remove the problem, disabling textures entirely, however, does. I.e.:

DL + Texture : 9fps
Immediate + Texture: 90fps
DL + No texture: 90 fps
Immediate + No texture: 90fps

I have no problem abandoning DLs, but would like to know what's causing this behaviour?

(BTW: It's a 2.5GHz intel CPU and a GeForce Ti4400 gfx. board if that makes any difference)

10-23-2004, 07:40 AM
It's been said that you should only issue geometry in display lists, for best performance. If you need to draw N things with N materials, you'd call N lists, and do the material changes in the calling code, not the display list.

Crazy theory of the day: Back in the days of OpenGL 1.0, you did not have texture objects (no BindTexture), so you'd have to define your texture objects as display lists that you "called" to "image" the current texture. It may be that the driver you have used to optimize for that case, and now some vestige of that code is causing your texture image to get copied each time you bind the texture...

Niels Jørgensen
10-23-2004, 08:08 AM
Thanks for the input. It's definately the use of multiple texture objects in the same display list that's causing a problem - Just not sure if it's a driver/GL issue or it's me using it the wrong way.