Am Montag 11 September 2006 19:56 schrieb H. Verbeet:
On 11/09/06, Stefan Dösinger stefandoesinger@gmx.at wrote:
That's what I'd use the state.changed field for. Set it to TRUE when the state is first modified and to FALSE when it it applied to gl. Do not add the state to the list of changes whn state.changed == TRUE
Well, sure, that's what the constants loading code does as well, but I still like a list better :-)
What would the list look like? Lionel was talking about some tree.
How would the complexity of the various operations compare? With an array and the chaned marker we have constant complexity for adding an element, determining if the list is empty, finding an element(the changed marker can store the position + 1) and emptiying the list. That is, I think, everything we need. We can't cheaply remove a single state from the dirty list, but I don't think we need this.