image/svg+xml
L1
L3
L2
L4
T1
L1
L3
L2
L4
L1
L3
L2
L4
T2
HashMap<id, Tile>
DT1
L1
L3
L2
L4
DT2
HashMap<id, VertexBuffer>
Draw(target) Draw(target) Load() Load() Each frame check if the viewchanged and load correct tilesfrom the hash map
Polygons of T1/L1 can overlapwith polygons of T2/L2 (they arenot cut off at the edge of the tile).
If the tile is presen in the hash map 2,do nothing on load.If it is not present, insert it and load vertex buffer.Remove all old items.Each frame iterate over hash map 2and draw all loaded vertex buffers.