X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2F3d%2Foverlay.cpp;h=ed413cd4f943cb59e7dbaed00481889d8363b230;hb=251270c97a5e5eb8630bc1662a406255dedae90e;hp=ee9fea7892d465c8e439161cbf4bce17edd0c81f;hpb=1ff06c5bc46a677fa389ef86c6b26664368f1653;p=r2c2.git diff --git a/source/3d/overlay.cpp b/source/3d/overlay.cpp index ee9fea7..ed413cd 100644 --- a/source/3d/overlay.cpp +++ b/source/3d/overlay.cpp @@ -1,13 +1,14 @@ /* $Id$ This file is part of R²C² -Copyright © 2010 Mikkosoft Productions, Mikko Rasa +Copyright © 2010-2011 Mikkosoft Productions, Mikko Rasa Distributed under the GPL */ #include #include #include +#include #include #include #include @@ -103,7 +104,7 @@ void Overlay3D::render(const GL::Tag &tag) const const Icon &icon = *i->second; - Point node = i->first->get_node(); + Vector node = i->first->get_node(); GL::Vector3 p = camera.project(GL::Vector3(node.x, node.y, node.z)); GL::PushMatrix push_mat; @@ -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); } }