]> git.tdb.fi Git - r2c2.git/commitdiff
Fix overlay text colors
authorMikko Rasa <tdb@tdb.fi>
Sat, 8 Jan 2011 14:26:05 +0000 (14:26 +0000)
committerMikko Rasa <tdb@tdb.fi>
Sat, 8 Jan 2011 14:26:05 +0000 (14:26 +0000)
source/3d/overlay.cpp

index ee9fea7892d465c8e439161cbf4bce17edd0c81f..87c49babc773a6854dfe53992d80c5bb9d71eef8 100644 (file)
@@ -8,6 +8,7 @@ Distributed under the GPL
 #include <algorithm>
 #include <cmath>
 #include <msp/fs/path.h>
+#include <msp/gl/immediate.h>
 #include <msp/gl/matrix.h>
 #include <msp/gl/texture.h>
 #include <msp/io/print.h>
@@ -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);
        }
 }