working on refactoring
This commit is contained in:
1 parent
9b71ee447a
commit
d5ef126264
12 files changed
+309
-219
No files matched your search
@@ -82,10 +82,9 @@ namespace FRG
|
||||
|
||||
// Marks every texture cached so far as resident, so UnloadNonResident() keeps it.
|
||||
void MarkAllResident();
|
||||
// Drops cached textures that aren't resident and whose key doesn't start with
|
||||
// residentPrefix (e.g. UI images, which are reloaded under the same prefix). A
|
||||
// texture is freed once nothing else holds it.
|
||||
void UnloadNonResident(const std::string& residentPrefix = "");
|
||||
// Frees cached textures nothing else uses any more (only the cache holds them),
|
||||
// except resident ones. Call after releasing the objects that used them.
|
||||
void UnloadUnused();
|
||||
|
||||
private:
|
||||
std::unordered_map<std::string, std::shared_ptr<Texture>> textureMap;
|
||||
|
||||
Reference in new issue
Block a user