mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2024-11-25 09:44:02 +00:00
fixup core resource (un/re)load
This commit is contained in:
parent
825670f651
commit
5e75bc486c
3 changed files with 6 additions and 12 deletions
|
@ -1883,7 +1883,7 @@ void Core::shutdown()
|
|||
debugLog("OK");
|
||||
|
||||
debugLog("Clear All Resources...");
|
||||
texmgr.shutdown();
|
||||
texmgr.unloadAll();
|
||||
debugLog("OK");
|
||||
|
||||
|
||||
|
@ -1961,10 +1961,7 @@ void Core::switchRenderObjectLayer(RenderObject *o, unsigned toLayer)
|
|||
|
||||
void Core::unloadResources()
|
||||
{
|
||||
/*for (size_t i = 0; i < resources.size(); i++)
|
||||
{
|
||||
resources[i]->unload();
|
||||
}*/
|
||||
this->texmgr.unloadAll();
|
||||
}
|
||||
|
||||
void Core::onReloadResources()
|
||||
|
@ -1973,11 +1970,8 @@ void Core::onReloadResources()
|
|||
|
||||
void Core::reloadResources()
|
||||
{
|
||||
/*for (size_t i = 0; i < resources.size(); i++)
|
||||
{
|
||||
resources[i]->reload();
|
||||
}
|
||||
onReloadResources();*/
|
||||
this->texmgr.reloadAll(TextureMgr::OVERWRITE);
|
||||
this->onReloadResources();
|
||||
}
|
||||
|
||||
const std::string & Core::getBaseTexturePath() const
|
||||
|
|
|
@ -209,7 +209,7 @@ void TextureMgr::clearUnused()
|
|||
debugLog(os.str());
|
||||
}
|
||||
|
||||
void TextureMgr::shutdown()
|
||||
void TextureMgr::unloadAll()
|
||||
{
|
||||
for(TexCache::iterator it = cache.begin(); it != cache.end(); ++it)
|
||||
it->second->unload();
|
||||
|
|
|
@ -21,7 +21,7 @@ public:
|
|||
size_t getNumLoaded() const;
|
||||
Texture *getOrLoad(const std::string& name);
|
||||
void clearUnused(); // clear everything whose refcount is 1
|
||||
void shutdown();
|
||||
void unloadAll();
|
||||
|
||||
enum LoadMode
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue