I agree and would have done it 'from count-1 downto 0' but that is not possible with TDictionary. Anyway freeing the Chunks is only for the program shutdown so performance is not that important anyway.
Also I think if I do
for Chunk in TDict.Values do Chunk.Free
it still leaves the keys in, so the size of TDict size is not updated. Might be the size is not updated even if I removed the key as well, since there is some method to it called TrimExcess
Didn't work much today.
Fixed one bug, but made no progress on the case of too large VBO size causing full chunks disappear.
Line of 11x11 size chunks along X axis. If I decrease the count by few they all fill a nice solid line as supposed to. Too many like here, and something gets corrupted. Note the closest artifact, the whole chunk is not missing, only half of it (It is hollow since none of the cubes that should not be visible are not drawn)
Image2.jpg
Bookmarks