X-Git-Url: http://git.tdb.fi/?p=netvis.git;a=blobdiff_plain;f=source%2Fhost.cpp;fp=source%2Fhost.cpp;h=54f8b201ca0721683d08ffc905a2469dfec86305;hp=fca3a304e545d29eefafd8201958020c92b6470e;hb=d21b97e4f7f62ccdaf347012d6355a76f974f87e;hpb=5174306b22f9a7f761ee00b24ada9cb3211cc09e diff --git a/source/host.cpp b/source/host.cpp index fca3a30..54f8b20 100644 --- a/source/host.cpp +++ b/source/host.cpp @@ -137,8 +137,8 @@ void Host::render() const if(!active) return; - GL::PushMatrix push_; - GL::translate(static_cast(pos.x), static_cast(pos.y), 0); + GL::MatrixStack::Push push_(GL::MatrixStack::modelview()); + GL::MatrixStack::modelview() *= GL::Matrix::translation(static_cast(pos.x), static_cast(pos.y), 0); GL::Immediate imm((GL::COLOR4_UBYTE, GL::TEXCOORD2, GL::VERTEX2)); imm.begin(GL::QUADS); @@ -150,10 +150,9 @@ void Host::render() const imm.end(); const GL::Font &font = netvis.get_font(); - GL::translate(-static_cast(font.get_string_width(short_name)*5), 6, 0); - GL::scale_uniform(10); + GL::MatrixStack::modelview() *= GL::Matrix::translation(-static_cast(font.get_string_width(short_name)*5), 6, 0); + GL::MatrixStack::modelview() *= GL::Matrix::scaling(10); - imm.color(1.0f, 1.0f, 1.0f); - font.draw_string(short_name, imm); + font.draw_string(short_name); GL::Texture::unbind(); }