Tuning for display lists focuses mainly on reducing storage requirements. Performance improves if the data fit in the cache because this avoids cache misses when the data is retraversed.
Follow these rules to optimize display lists:
This frees storage space used by the deleted display lists and expedites the creation of new display lists.
For example, if you have a scene with 100 spheres of different sizes and materials, generate one display list that is a unit sphere centered about the origin. Then for each sphere in the scene, follow these steps:
In this way, a reference to the unit sphere display list is stored instead of all of the sphere vertices for each instance of the sphere.
Avoid using an excessive hierarchy with many invocations of glCallList(). Each glCallList() invocation causes a table lookup to find the designated display list. A flat display list requires less memory and yields simpler and faster traversal. It also improves cache coherency.
On the other hand, excessive flattening increases the size. For example, if you're drawing a car with four wheels, having a hierarchy with four pointers from the body to one wheel is preferable to a flat structure with one body and four wheels.
Note: See Chapter 14, "System-Specific Tuning," for potential display list optimizations on the system you are using.