store text of text drawable

This commit is contained in:
ohyzha
2024-11-04 18:19:20 +02:00
parent e43d86cf4f
commit 4f3336014a
2 changed files with 3 additions and 0 deletions

View File

@@ -150,6 +150,7 @@ namespace OpenVulkano::Scene
return;
}
m_text = text;
auto GetActualLength = [&]()
{
auto begin = text.begin();

View File

@@ -51,6 +51,7 @@ namespace OpenVulkano::Scene
Math::AABB& GetBoundingBox() { return m_bbox; }
TextConfig& GetConfig() { return m_cfg; }
Shader* GetShader() { return m_shader; }
std::string& GetText() { return m_text; }
std::shared_ptr<AtlasData> GetAtlasData() { return m_atlasData; }
private:
Geometry m_geometry;
@@ -59,6 +60,7 @@ namespace OpenVulkano::Scene
std::shared_ptr<AtlasData> m_atlasData;
Math::AABB m_bbox;
Shader* m_shader = nullptr;
std::string m_text;
TextConfig m_cfg;
};
}