X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fhistory.cpp;fp=source%2Fhistory.cpp;h=19f6b34a9d3275662fb44f8c5b793e442966849e;hb=d21b97e4f7f62ccdaf347012d6355a76f974f87e;hp=b3e15f213cc151a18867b04a23825b8f7917b6c6;hpb=5174306b22f9a7f761ee00b24ada9cb3211cc09e;p=netvis.git diff --git a/source/history.cpp b/source/history.cpp index b3e15f2..19f6b34 100644 --- a/source/history.cpp +++ b/source/history.cpp @@ -10,7 +10,7 @@ Distributed unter the GPL #include #include #include -#include +#include #include #include "history.h" #include "netvis.h" @@ -33,7 +33,7 @@ History::History(NetVis &n, unsigned w, unsigned h): for(texw=1; texw(height)/texw; @@ -105,16 +105,14 @@ void History::render() const value /= 1024; suffix = 'M'; } - GL::PushMatrix push_; - GL::translate(width+5, height-10, 0); - GL::scale_uniform(10); - GL::Immediate imm((GL::COLOR4_UBYTE, GL::TEXCOORD2, GL::VERTEX2)); - imm.color(1.0f, 1.0f, 1.0f); - netvis.get_font().draw_string(format("%d%c", value, suffix), imm); - GL::translate(0, (height-12)*-0.05, 0); - netvis.get_font().draw_string(format("%g%c", value*0.5, suffix), imm); - GL::translate(0, (height-12)*-0.05, 0); - netvis.get_font().draw_string(format("0%c", suffix), imm); + GL::MatrixStack::Push push_(GL::MatrixStack::modelview()); + GL::MatrixStack::modelview() *= GL::Matrix::translation(width+5, height-10, 0); + GL::MatrixStack::modelview() *= GL::Matrix::scaling(10); + netvis.get_font().draw_string(format("%d%c", value, suffix)); + GL::MatrixStack::modelview() *= GL::Matrix::translation(0, (height-12)*-0.05, 0); + netvis.get_font().draw_string(format("%g%c", value*0.5, suffix)); + GL::MatrixStack::modelview() *= GL::Matrix::translation(0, (height-12)*-0.05, 0); + netvis.get_font().draw_string(format("0%c", suffix)); GL::Texture::unbind(); }