summaryrefslogtreecommitdiff
path: root/src/resources/loaders/atlasloader.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-03-04 02:38:36 +0300
committerAndrei Karas <akaras@inbox.ru>2018-03-04 02:38:36 +0300
commita698e2e44e3dfa157c2b184a184db204b44a6a30 (patch)
tree66876f11a3e80e5bfab69cfd4ce17ed2a59df896 /src/resources/loaders/atlasloader.cpp
parent44ef6547161dd3cd2e1bb4053bb5e8619e6dc0d0 (diff)
downloadmanaverse-a698e2e44e3dfa157c2b184a184db204b44a6a30.tar.gz
manaverse-a698e2e44e3dfa157c2b184a184db204b44a6a30.tar.bz2
manaverse-a698e2e44e3dfa157c2b184a184db204b44a6a30.tar.xz
manaverse-a698e2e44e3dfa157c2b184a184db204b44a6a30.zip
Show current atlases count in debug window.
If use too many images, atlase can be split to more than one. And this is performance issue.
Diffstat (limited to 'src/resources/loaders/atlasloader.cpp')
-rw-r--r--src/resources/loaders/atlasloader.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/resources/loaders/atlasloader.cpp b/src/resources/loaders/atlasloader.cpp
index 6ca23ddea..aa2585b27 100644
--- a/src/resources/loaders/atlasloader.cpp
+++ b/src/resources/loaders/atlasloader.cpp
@@ -52,11 +52,13 @@ struct AtlasLoader final
}
};
-Resource *Loader::getAtlas(const std::string &name,
- const StringVect &files)
+AtlasResource *Loader::getAtlas(const std::string &name,
+ const StringVect &files)
{
AtlasLoader rl = { name, &files };
- return ResourceManager::get("atlas_" + name, AtlasLoader::load, &rl);
+ return static_cast<AtlasResource*>(ResourceManager::get(
+ "atlas_" + name,
+ AtlasLoader::load, &rl));
}
#endif // USE_OPENGL