aboutsummaryrefslogtreecommitdiffstats
path: root/src/text.cpp
diff options
context:
space:
mode:
authorClyne Sullivan <clyne@bitgloo.com>2019-09-17 15:06:39 -0400
committerClyne Sullivan <clyne@bitgloo.com>2019-09-17 15:06:39 -0400
commit927348d9d8eb16b469c23ef32486bea5f94c5469 (patch)
tree58caa1e9eff92c1e6bafe9483c01b746bbecbeaf /src/text.cpp
parentceda39e4bd2e3a7794f0cb4f96df1de6ebee47d2 (diff)
made VBO rendering accessible
Diffstat (limited to 'src/text.cpp')
-rw-r--r--src/text.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/text.cpp b/src/text.cpp
index 8726b88..186907f 100644
--- a/src/text.cpp
+++ b/src/text.cpp
@@ -97,6 +97,17 @@ void TextSystem::loadFont(const std::string& name,
<< font.tex << ")" << std::endl;
}
+void TextSystem::put(const std::string& font,
+ float x,
+ float y,
+ const std::string& text)
+{
+ if (fontData.find(font) == fontData.end())
+ return;
+
+ fontData[font].text.emplace_back(text, x, y);
+}
+
void TextSystem::updateVBOs(void)
{
for (auto& data : fontData) {