mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2024-11-25 17:53:47 +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("OK");
|
||||||
|
|
||||||
debugLog("Clear All Resources...");
|
debugLog("Clear All Resources...");
|
||||||
texmgr.shutdown();
|
texmgr.unloadAll();
|
||||||
debugLog("OK");
|
debugLog("OK");
|
||||||
|
|
||||||
|
|
||||||
|
@ -1961,10 +1961,7 @@ void Core::switchRenderObjectLayer(RenderObject *o, unsigned toLayer)
|
||||||
|
|
||||||
void Core::unloadResources()
|
void Core::unloadResources()
|
||||||
{
|
{
|
||||||
/*for (size_t i = 0; i < resources.size(); i++)
|
this->texmgr.unloadAll();
|
||||||
{
|
|
||||||
resources[i]->unload();
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Core::onReloadResources()
|
void Core::onReloadResources()
|
||||||
|
@ -1973,11 +1970,8 @@ void Core::onReloadResources()
|
||||||
|
|
||||||
void Core::reloadResources()
|
void Core::reloadResources()
|
||||||
{
|
{
|
||||||
/*for (size_t i = 0; i < resources.size(); i++)
|
this->texmgr.reloadAll(TextureMgr::OVERWRITE);
|
||||||
{
|
this->onReloadResources();
|
||||||
resources[i]->reload();
|
|
||||||
}
|
|
||||||
onReloadResources();*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string & Core::getBaseTexturePath() const
|
const std::string & Core::getBaseTexturePath() const
|
||||||
|
|
|
@ -209,7 +209,7 @@ void TextureMgr::clearUnused()
|
||||||
debugLog(os.str());
|
debugLog(os.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextureMgr::shutdown()
|
void TextureMgr::unloadAll()
|
||||||
{
|
{
|
||||||
for(TexCache::iterator it = cache.begin(); it != cache.end(); ++it)
|
for(TexCache::iterator it = cache.begin(); it != cache.end(); ++it)
|
||||||
it->second->unload();
|
it->second->unload();
|
||||||
|
|
|
@ -21,7 +21,7 @@ public:
|
||||||
size_t getNumLoaded() const;
|
size_t getNumLoaded() const;
|
||||||
Texture *getOrLoad(const std::string& name);
|
Texture *getOrLoad(const std::string& name);
|
||||||
void clearUnused(); // clear everything whose refcount is 1
|
void clearUnused(); // clear everything whose refcount is 1
|
||||||
void shutdown();
|
void unloadAll();
|
||||||
|
|
||||||
enum LoadMode
|
enum LoadMode
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue