Fix bugs introduced by refactoring

This commit is contained in:
Georg Hagen
2025-01-04 02:45:46 +01:00
parent 884949f92f
commit bc78af70e8
2 changed files with 10 additions and 6 deletions

View File

@@ -74,10 +74,9 @@ namespace OpenVulkano::Scene
TextDrawable& textDrawable = m_texts.emplace_back(m_atlasData, config);
// do not render glyph's background
textDrawable.GetConfig().backgroundColor.a = 0;
textDrawable.SetShader(&m_textShader);
double lineHeight = m_atlasData->meta.lineHeight;
textDrawable.GenerateText(text, m_position);
textDrawable.SetShader(&m_textShader);
m_bbox.Grow(textDrawable.GetBoundingBox());
// update position for next text entry
m_position.y = m_bbox.GetMin().y - lineHeight;