X-Git-Url: http://git.tdb.fi/?p=netvis.git;a=blobdiff_plain;f=source%2Fport.cpp;fp=source%2Fport.cpp;h=a96e151fcd63c9d82f933d91bfc9b879d469c96e;hp=5c0bfa62435634892f970f282887e8ef006b41a8;hb=d21b97e4f7f62ccdaf347012d6355a76f974f87e;hpb=5174306b22f9a7f761ee00b24ada9cb3211cc09e diff --git a/source/port.cpp b/source/port.cpp index 5c0bfa6..a96e151 100644 --- a/source/port.cpp +++ b/source/port.cpp @@ -37,7 +37,7 @@ Port::Port(NetVis &v, unsigned n): registered = !isdigit(name[0]); } else - name = Msp::lexical_cast(number); + name = Msp::lexical_cast(number); const map &ports = netvis.get_ports(); unsigned tries = 100; @@ -104,7 +104,7 @@ void Port::tick(const Time::TimeDelta &dt) void Port::render() const { - GL::PushMatrix push_; + GL::MatrixStack::Push push_(GL::MatrixStack::modelview()); mesh.draw(); { GL::Immediate imm((GL::COLOR4_UBYTE, GL::VERTEX2)); @@ -117,11 +117,8 @@ void Port::render() const imm.vertex(14, 10); imm.end(); } - GL::translate(16, 1, 0); - GL::scale_uniform(10); - { - GL::Immediate imm((GL::COLOR4_UBYTE, GL::TEXCOORD2, GL::VERTEX2)); - netvis.get_font().draw_string(name, imm); - } + GL::MatrixStack::modelview() *= GL::Matrix::translation(16, 1, 0); + GL::MatrixStack::modelview() *= GL::Matrix::scaling(10); + netvis.get_font().draw_string(name); GL::Texture::unbind(); }