From e3682e2cdcb59c36792f6f9c39569e0af01088f0 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 25 May 2015 01:58:52 +0300 Subject: Dont set global color variables before drawing text. This allow not set actual OpenGL color on each call because it useless for drawing text. --- src/actions/actions.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/actions') diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp index eb05e5811..caef71b01 100644 --- a/src/actions/actions.cpp +++ b/src/actions/actions.cpp @@ -1372,15 +1372,17 @@ impHandler0(testSdlFont) nullGraphics->beginDraw(); clock_gettime(CLOCK_MONOTONIC, &time1); + Color color(0, 0, 0, 255); + for (int f = 0; f < 500; f ++) { FOR_EACH (std::vector::const_iterator, it, data) { width += font->getWidth(*it); - font->drawString(nullGraphics, *it, 10, 10); + font->drawString(nullGraphics, color, color, *it, 10, 10); } FOR_EACH (std::vector::const_iterator, it, data) - font->drawString(nullGraphics, *it, 10, 10); + font->drawString(nullGraphics, color, color, *it, 10, 10); font->doClean(); } -- cgit v1.2.3-60-g2f50