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

@ -343,11 +343,11 @@ void PlacefileIcons::Impl::Update()
{
// Icon
lat, lon, lx, by, ls, bt, mc0, mc1, mc2, mc3, a, // BL
lat, lon, lx, by, ls, tt, mc0, mc1, mc2, mc3, a, // TL
lat, lon, rx, ty, rs, bt, mc0, mc1, mc2, mc3, a, // BR
lat, lon, rx, ty, rs, bt, mc0, mc1, mc2, mc3, a, // BR
lat, lon, lx, ty, ls, tt, mc0, mc1, mc2, mc3, a, // TL
lat, lon, rx, by, rs, bt, mc0, mc1, mc2, mc3, a, // BR
lat, lon, rx, by, rs, bt, mc0, mc1, mc2, mc3, a, // BR
lat, lon, rx, ty, rs, tt, mc0, mc1, mc2, mc3, a, // TR
lat, lon, lx, by, ls, tt, mc0, mc1, mc2, mc3, a // TL
lat, lon, lx, ty, ls, tt, mc0, mc1, mc2, mc3, a // TL
});
numVertices_ += 6;

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_;