-
Notifications
You must be signed in to change notification settings - Fork 255
Open
Description
In the tile reader there is a map that keeps tiles alive to reuse their geometry, saving VRAM, but because of the ref_ptr those tiles are never deleted which overtime leads to VRAM filling completely in certain conditions, for example when an elevation layer is used.
So far changing
mutable std::map<dvec4, ref_ptr<VertexIndexDraw>> _geometryMap;
to
mutable std::map<dvec4, observer_ptr<VertexIndexDraw>> _geometryMap;
and adding a check for null in tile::createECEFTile:
// check if reusable geometry exists already
{
std::scoped_lock<std::mutex> lock(_geometryMapMutex);
if (auto itr = _geometryMap.find(geometryKey); itr != _geometryMap.end())
{
if (itr->second)
vid = itr->second;
}
};
seemingly solves the problem with no observable side effects.
Metadata
Metadata
Assignees
Labels
No labels