View Full Version : how to compile a display list and save to disk
11-16-2005, 06:17 PM
Hi, I was trying to optimize my program so I added display lists. I found that they render very fast but take a while to compile (especially with a lot of triangles) So I implemented VBO arrays and the program loaded much faster but I ran into rendering performance problems.
With no lighting and no colors my VBOs were marginally faster for rendering than display lists.
When I add either lighting or colors it is the same speed as display lists.
With lighting and colors it was considerably slower.
These tests were done with 1,000,000 triangles on an nvidia geforce 5200
I figured there should be a way to compile a display list and save it to disk as a file, then load it quick. Is this possible? any other suggestions? thanks.
You can't save a display list.
However, something that bothers me is the way you did the test. Did you use both lighting and color? You know, lighting and manual coloring through the primary color are mutually exclusive. When lighting is enabled, the primary color is caluclated through the lighting equation, and the color you supply is ignored, so using both coloring and lighting would, altough shown slower with VBO, be a non-existing case in practice.
On the other hand, if you refer to coloring as setting material properties using the color material functions, then you can use the color array and lighting at the same time. But I can imagine this could be something the driver doesn't like performancewise, and you should only render objects that have the same states in the same batch. If you need to change material properties for different objects, try render the objects indivitually and set material states between the objects.
11-17-2005, 01:57 PM
I think if I break down my object into multiple display lists of 1000 triangles or less the problem is essentially solved. The program loads much faster. This means the display list compile algorithm is slower than O(n)
I want to be able to have an object that is not a uniform color and also do specular ambient and diffuse lighting calculations on it. Is this possible without color arrays?
11-17-2005, 07:41 PM
I think color array is the fastest way, because you need source of color for the vertices anyway, for example, reading from data file or array in your application, unless generation random colors in run time.
I have a question for you. You originally posted to draw 1,000,000 tris. If you splited 1000 tris per DL, then you need 1000 DLs to compile entire triangles. Did you mean compiling 1000 DLs is faster than a single DL?
11-17-2005, 09:05 PM
yes compiling 1000 dls of 1000 triangles each is faster than one dl of 1000000 triangles on my video card.
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.