Fix rendering of placefile icons, now works on one map

This commit is contained in:
Dan Paulat 2023-08-02 00:02:33 -05:00
parent f074e487de
commit bc1bf8cef6
5 changed files with 32 additions and 21 deletions

View file

@ -77,9 +77,11 @@ GLuint GlContext::GetTextureAtlas()
{
std::unique_lock lock(p->textureMutex_);
if (p->textureAtlas_ == GL_INVALID_INDEX)
auto& textureAtlas = util::TextureAtlas::Instance();
if (p->textureAtlas_ == GL_INVALID_INDEX || textureAtlas.NeedsBuffered())
{
p->textureAtlas_ = util::TextureAtlas::Instance().BufferAtlas(p->gl_);
p->textureAtlas_ = textureAtlas.BufferAtlas(p->gl_);
}
return p->textureAtlas_;