From: Mikko Rasa Date: Sat, 8 Jan 2011 14:26:05 +0000 (+0000) Subject: Fix overlay text colors X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=fa7cc825ea7aee9328ecd03b67617847fd128f85;p=r2c2.git Fix overlay text colors --- diff --git a/source/3d/overlay.cpp b/source/3d/overlay.cpp index ee9fea7..87c49ba 100644 --- a/source/3d/overlay.cpp +++ b/source/3d/overlay.cpp @@ -8,6 +8,7 @@ Distributed under the GPL #include #include #include +#include #include #include #include @@ -122,7 +123,9 @@ void Overlay3D::render(const GL::Tag &tag) const } GL::translate(0, baseline, 0); - font.draw_string(icon.label); + GL::Immediate imm((GL::TEXCOORD2, GL::COLOR4_UBYTE, GL::VERTEX2)); + imm.color(0.0f, 1.0f, 0.0f); + font.draw_string(icon.label, imm); GL::Texture::unbind(); } @@ -130,6 +133,8 @@ void Overlay3D::render(const GL::Tag &tag) const GL::pop_matrix(); GL::matrix_mode(GL::MODELVIEW); GL::pop_matrix(); + + glColor3f(1.0, 1.0, 1.0); } }