X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2F3d%2Foverlay.cpp;h=87c49babc773a6854dfe53992d80c5bb9d71eef8;hb=dbaa67c30705a9993d2626cec588c7320f1eef17;hp=39428a166d57ff4f622521b21471d9b9092e9eab;hpb=dc3b2bce73df40ea885a1960a825e5cd3a33c045;p=r2c2.git diff --git a/source/3d/overlay.cpp b/source/3d/overlay.cpp index 39428a1..87c49ba 100644 --- a/source/3d/overlay.cpp +++ b/source/3d/overlay.cpp @@ -1,6 +1,6 @@ /* $Id$ -This file is part of the MSP Märklin suite +This file is part of R²C² Copyright © 2010 Mikkosoft Productions, Mikko Rasa Distributed under the GPL */ @@ -8,6 +8,7 @@ Distributed under the GPL #include #include #include +#include #include #include #include @@ -18,7 +19,7 @@ Distributed under the GPL using namespace std; using namespace Msp; -namespace Marklin { +namespace R2C2 { Overlay3D::Overlay3D(const Graphics::Window &w, const GL::Camera &c, const GL::Font &f): window(w), @@ -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); } } @@ -195,4 +200,4 @@ Overlay3D::Icon::Icon(): background((GL::COLOR4_UBYTE, GL::VERTEX2)) { } -} // namespace Marklin +} // namespace R2C2