]> git.tdb.fi Git - r2c2.git/blobdiff - source/engineer/engineer.cpp
Mscellaneous adaptations to mspgl API changes
[r2c2.git] / source / engineer / engineer.cpp
index 133aa2cc815174bf76211459af064d986803c2a6..bc32dfb848a52d92c4069aeb076760fc90d05182 100644 (file)
@@ -13,7 +13,6 @@
 #include <msp/gl/misc.h>
 #include <msp/gl/projection.h>
 #include <msp/gl/tests.h>
-#include <msp/gl/transform.h>
 #include <msp/io/print.h>
 #include <msp/strings/format.h>
 #include <msp/time/units.h>
@@ -225,13 +224,13 @@ void Engineer::tick()
 
        if(picking && picking_track && picking_entry>=0)
        {
-               GL::PushMatrix push_mat;
+               GL::MatrixStack::Push push_mat(GL::MatrixStack::modelview());
 
                float rot = picking_track->get_endpoint_direction(picking_entry);
                Vector pos = picking_track->get_endpoint_position(picking_entry);
 
-               GL::translate(pos.x, pos.y, pos.z+0.03);
-               GL::rotate(rot*180/M_PI+180, 0, 0, 1);
+               GL::MatrixStack::modelview() *= GL::Matrix::translation(pos.x, pos.y, pos.z+0.03);
+               GL::MatrixStack::modelview() *= GL::Matrix::rotation(rot+M_PI, 0, 0, 1);
 
                arrow_mesh.draw();
        }