summaryrefslogtreecommitdiff
path: root/test/test-text.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-01-27 21:47:04 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2024-01-27 21:47:04 +0000
commit264640420882ceeafd9b1149eba9472cf8835e7b (patch)
treedad2b2cbe2bc8bf5560f4859880549472f808671 /test/test-text.cpp
parentAdd traits vertex attrib func override for arrays (diff)
downloadilt-264640420882ceeafd9b1149eba9472cf8835e7b.tar.bz2
ilt-264640420882ceeafd9b1149eba9472cf8835e7b.tar.xz
ilt-264640420882ceeafd9b1149eba9472cf8835e7b.zip
Render text in N draw calls
Creates a single buffer per required texture and draws the whole buffer in one go. It does introduce the use of deprecated GL_QUADS primitive, but it's the easiest way to go without needing indices, repeated vertices etc
Diffstat (limited to 'test/test-text.cpp')
-rw-r--r--test/test-text.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/test-text.cpp b/test/test-text.cpp
index b540b5a..f652670 100644
--- a/test/test-text.cpp
+++ b/test/test-text.cpp
@@ -121,9 +121,9 @@ BOOST_AUTO_TEST_CASE(render_text)
glViewport(0, 0, 640, 480);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- Text t {"I Like Trains", *this, {{0, 0}, {200, 40}}, {1, 1, 1}};
+ Text t {"I Like Trains", *this, {{10, 10}, {200, 40}}, {1, 1, 1}};
UIShader s {640, 480};
- t.render(s, {{200, 200}, {200, 100}});
+ t.render(s, {});
Texture::save(output.outImage, "/tmp/text.tga");
}