Skip to content

Commit

Permalink
ResourceRegistry: added Clear() method
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMostDiligent committed Feb 15, 2024
1 parent 3d955bd commit 300b293
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Graphics/GraphicsTools/interface/ResourceRegistry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,12 @@ class ResourceRegistry
return ResourceAccessor{m_Resources[Id]};
}

void Clear()
{
for (auto& pRes : m_Resources)
pRes.Release();
}

private:
std::vector<RefCntAutoPtr<IDeviceObject>> m_Resources;
};
Expand Down

0 comments on commit 300b293

Please sign in to comment.