Display List Oddity

I was rendering 2500 pyramids. These pyramids were frustum culled, without display lists, I was getting about 55 fps rendering 615 or so at a time. I figured an easy speed up would be to render these as display lists. That would cut down on the gl calls and thus the JNI calls. However, I obtained no speed benefit, in fact, it was a little slower. These a completely static models, I was expecting a decent frame rate increase. Any ideas?

an example sourcecode can be downloaded here.

Not quite sure what you are saying.

What this tells you is exactly what it looks like: it’s slower to call a tiny display list 600 times than it is to do 600 calls to glDrawElements.

Display lists are used less and less in GL now (and in fact don’t even work properly on some cards - grrr!) as they are very inflexible.

Cas :slight_smile:

Thanks Cas. I was hoping for a quick and easy speed enhancement, but I guess it’s not to be. Time I learned to use Vertex Arrays properly.

The very fastest bestest new way to do it is ARB_vertex_buffer_object, but hardly anyone has drivers for it, so you’ll have to revert to NV_vertex_array_range2 or ATI_vertex_buffer_object, and then glDrawRangeElements, then EXT_compiled_vertex_array, and finally using glDrawElements on its own without any help from extensions.

Cas :slight_smile: