Display list problem...

Can I modify an opengl display list?
I need this feature because I want to modify a small portion of a large 3D scene. Since most of the scene remains unchanged, I don’t want rebuild display list at length while retrieve the display correctness.
If only the OpenGL provides some API supporting modify some portion of a large display list…
Or could you give me some hint to an alternative way?

You can’t modify display lists.

However, you don’t have to put your whole scene into one display list. Use display lists for the static parts and render the rest using immediate mode (or preferably vertex arrays).

You can also use nested display lists, where one display list calls another. This allows you to respecify parts of your scene as well, but I’d say vertex arrays are better for geometry that is frequently updated.

Xiaofeng, display lists are anyway crap for vertex data flushing. They make a bunch of sense for things like materials (so that you don’t need an API call for each property) and also for backing up register combiner flags settings, but not for vertices.

By what I experienced till now vertex arrays are always exactly as fast as display lists, even the system memory side ones are. And them you can modify all the time as much as you like to. Of course they make a bunch of more organisation work, but with your display lists you are going totally into the wrong direction and you will regret it sooner or later.

If your whole engine is based now on display lists you will surely have a bunch of work to get it rewritten for VAs, but it really is the work worth… and then you also don’t need to worry about changing the contents anymore .

BlackJack