X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fwidget.cpp;h=efb6155ef4a51d8fb4e69bde95323ea4e10c250d;hb=9b29612d1cde85fee9b3f011e86a5cabe5dbcce3;hp=be1f0a0cc90fb981bc0ea1a121e3f3f92d95030e;hpb=50bf1ef2e2c3c38de20f6996a6c5ed0066111177;p=libs%2Fgltk.git diff --git a/source/widget.cpp b/source/widget.cpp index be1f0a0..efb6155 100644 --- a/source/widget.cpp +++ b/source/widget.cpp @@ -5,6 +5,7 @@ Copyright © 2007 Mikko Rasa, Mikkosoft Productions Distributed under the LGPL */ +#include #include #include #include @@ -108,9 +109,9 @@ void Widget::render_text(const Part &part, const string &text) const GL::scale_uniform(font_size); const GL::Color &color=style->get_font_color(); - glColor3f(color.r, color.g, color.b); - font->draw_string(text); - glColor3f(1, 1, 1); + GL::Immediate imm((GL::COLOR4_UBYTE, GL::TEXCOORD2, GL::VERTEX2)); + imm.color(color.r, color.g, color.b); + font->draw_string(text, imm); GL::pop_matrix(); }