Am 16.12.2009 um 13:44 schrieb Henri Verbeet:

> 2009/12/16 Stefan Dösinger <[email protected]>:
>> The best way I see to merge those two tracking mechanisms is to organize 
>> them as a list, and upload all modified ranges in PreLoad(), or if the 
>> buffer is single buffered and dynamic, flush all the ranges after the last 
>> unmap, and clear the list in both PreLoad and unmap. That way we can share 
>> the data structure, although it doesn't perfectly fit either purpose. We can 
>> also share some of the code. The downside is that GL doesn't start flushing 
>> until the final unmap on dynamic buffers.
>> 
> A list should work, but it doesn't have to be a single list.
Actually, since we're not going to Unmap-flush and PreLoad() the buffer(its 
either-or), I can use the same data structure for the stack and list(or well, 
dynamic array). I just have to watch out not to remove elements in any place in 
unlock that affects DOUBLEBUFFER buffers.

Here is what I have so far. Completely untested, and the flushing is not yet 
integrated.

Attachment: buffer_map_range.diff
Description: Binary data




Reply via email to