1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-27 21:35:24 +00:00

Merge branch 'fix_create_texture' into 'master'

Fix inserting texture to map

See merge request OpenMW/openmw!2191
This commit is contained in:
psi29a 2022-07-28 07:20:14 +00:00
commit e0a23aaa72

View File

@ -530,13 +530,8 @@ bool RenderManager::isFormatSupported(MyGUI::PixelFormat /*format*/, MyGUI::Text
MyGUI::ITexture* RenderManager::createTexture(const std::string &name)
{
auto item = mTextures.find(name);
if (item != mTextures.end())
mTextures.erase(item);
item = mTextures.emplace_hint(item, name, OSGTexture(name, mImageManager));
return &item->second;
const auto it = mTextures.insert_or_assign(name, OSGTexture(name, mImageManager)).first;
return &it->second;
}
void RenderManager::destroyTexture(MyGUI::ITexture *texture)