X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fdesigner%2Ftrackwrap.cpp;h=523c9678658c0b31acc94c66f42728eb6571c85d;hb=32316772d422223827833366a7ee2d0a76d76ff1;hp=1f620f3ff6be452e5c1ac617ab2e0fe06b64039a;hpb=d15ac13f2e170f155b4bbd124df48400c339b644;p=r2c2.git diff --git a/source/designer/trackwrap.cpp b/source/designer/trackwrap.cpp index 1f620f3..523c967 100644 --- a/source/designer/trackwrap.cpp +++ b/source/designer/trackwrap.cpp @@ -1,5 +1,6 @@ #include #include +#include #include "3d/tracktype.h" #include "selection.h" #include "trackwrap.h" @@ -21,15 +22,15 @@ TrackWrap::~TrackWrap() delete i->second; } -void TrackWrap::render(const GL::Tag &) const +void TrackWrap::render(GL::Renderer &renderer, const GL::Tag &) const { for(list::const_iterator i=wraps.begin(); i!=wraps.end(); ++i) { - GL::PushMatrix _pushm; + GL::MatrixStack::Push push(renderer.matrix_stack()); const Vector &pos = i->track->get_position(); - GL::translate(pos.x, pos.y, pos.z); - GL::rotate(i->track->get_rotation()*180/M_PI, 0, 0, 1); - i->mesh->draw(); + renderer.matrix_stack() *= GL::Matrix::translation(pos.x, pos.y, pos.z); + renderer.matrix_stack() *= GL::Matrix::rotation(i->track->get_rotation(), 0, 0, 1); + i->mesh->draw(renderer); } }