You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openmw/components/lua_ui/resources.cpp

21 lines
467 B
C++

#include "resources.hpp"
#include <components/vfs/pathutil.hpp>
namespace LuaUi
{
std::shared_ptr<TextureResource> ResourceManager::registerTexture(TextureData data)
{
VFS::Path::normalizeFilenameInPlace(data.mPath);
TextureResources& list = mTextures[data.mPath];
list.push_back(std::make_shared<TextureResource>(data));
return list.back();
}
void ResourceManager::clear()
{
mTextures.clear();
}
}