summaryrefslogtreecommitdiff
path: root/test
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
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')
-rw-r--r--test/Jamfile.jam2
-rw-r--r--test/test-text.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/test/Jamfile.jam b/test/Jamfile.jam
index c109051..733ef05 100644
--- a/test/Jamfile.jam
+++ b/test/Jamfile.jam
@@ -49,7 +49,7 @@ run test-lib.cpp ;
run test-geoData.cpp : -- : fixtures/height/SD19.asc : <library>test ;
run test-network.cpp : : : <library>test ;
run test-persistence.cpp : -- : [ sequence.insertion-sort [ glob-tree $(fixtures)/json : *.json ] ] : <library>test ;
-run test-text.cpp : : : <library>test ;
+run test-text.cpp : -- : test-glContainer : <library>test ;
run test-enumDetails.cpp ;
run test-render.cpp : -- : test-assetFactory : <library>test ;
run test-glContextBhvr.cpp ;
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");
}