Time to call glCallList

I have a program that renders a 1,000,000 triangle display list. Each frame, all it does is call glCallList. I’m timing the call with gettimeofday(), and it seems to take 11-12ms to call glCallList. Now, I thought glCallList would return right away, even if it hasn’t quite finished drawing. Then I changed everything around to use vertex/normal arrays instead of a display list, and it didn’t speed up at all. What could be slowing down this call, and why would it be taking any time in the first place?

This is all very OpenGL implementation dependent and dependent on your display list contents.
12 ms per CallList means you drew at least 83 million vertices per second, this is not too bad.
If you have a hardware which can deal with a million triangles in a buffer it might send it and be done with it, returning immediately, if not, then not.
If the display list contains multiple primitives in begin-end chunks or other stuff, this is more work than if not.
If the hardware cannot deal with a million vertices in one primitive, try chunking it into smaller begin-end parts. 16 bit counts are a good idea.
Vertex Arrays are not the same as highly optimized display lists, but nearer to immediate mode. Put the vertex arrays into vertex buffer objects, this brings the data on server side.

Hi !

1M triangles might use huge amounts of GPU memory and may not fit in there, in that case you will not find much difference in speed with or without display lists because it will normal ram instead.


Do you think that might be why glCallLists is blocking for 12ms instead of returning immediately? Because it has to keep retransferring all those triangles? Is there something I can do to make all those triangles smaller, like using a lower-precision form of glVertex?