First pass of asset cleanup

This commit is contained in:
Alexander Bock
2020-05-04 22:56:12 +02:00
parent 822de97f02
commit c8dff5c217
6 changed files with 111 additions and 150 deletions
+1 -1
View File
@@ -134,7 +134,7 @@ public:
bool isRequested() const;
bool shouldBeInitialized() const;
std::string resolveLocalResource(std::string resourceName);
std::string resolveLocalResource(std::string resourceName) const;
private:
void setState(State state);
+1 -1
View File
@@ -177,7 +177,7 @@ private:
void setUpAssetLuaTable(Asset* asset);
void tearDownAssetLuaTable(Asset* asset);
std::shared_ptr<Asset> getAsset(std::string name);
std::shared_ptr<Asset> getAsset(const std::string& name);
ghoul::filesystem::Directory currentDirectory() const;
void setCurrentAsset(std::shared_ptr<Asset> asset);
+4 -6
View File
@@ -41,12 +41,10 @@ class SynchronizationWatcher;
/**
* Interface for managing assets.
* The asset manager interface is only concerned with "top level" assets,
* i.e. assets that are loaded using setTargetAssetState, and not their dependencies.
* However, an asset is not considered synchronized before all its deps are
* synchronized.
* Also, setting a target state of an asset to Unloaded will only unload an asset
* from the system if it is not a dependency of a loaded asset.
* The asset manager interface is only concerned with "top level" assets, and not their
* dependencies. However, an asset is not considered synchronized before all its deps are
* synchronized. Also, setting a target state of an asset to Unloaded will only unload an
* asset from the system if it is not a dependency of a loaded asset.
*/
class AssetManager : AssetListener {