From: Mikko Rasa Date: Thu, 17 Jan 2013 13:42:59 +0000 (+0200) Subject: Mscellaneous adaptations to mspgl API changes X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=29433673a88dffd61ecb8e6c8fe6ab38e2012586;p=r2c2.git Mscellaneous adaptations to mspgl API changes --- diff --git a/source/3d/overlay.cpp b/source/3d/overlay.cpp index c10a8db..bab469c 100644 --- a/source/3d/overlay.cpp +++ b/source/3d/overlay.cpp @@ -84,7 +84,7 @@ void Overlay3D::render(GL::Renderer &renderer, const GL::Tag &) const glLineWidth(1); - int size = int(font.get_default_size()+0.5); + int size = int(font.get_native_size()+0.5); float spacing = round(size*1.1)/size; float baseline = round((0.5-font.get_ascent()*0.5-font.get_descent()*0.5)*size)/size; @@ -183,7 +183,7 @@ void Overlay3D::update_icon(Icon &icon) { GL::MeshBuilder bld(icon.text); bld.color(0.0f, 1.0f, 0.0f); - font.draw_string(icon.label, bld); + font.build_string(icon.label, bld); } } diff --git a/source/engineer/engineer.cpp b/source/engineer/engineer.cpp index 133aa2c..bc32dfb 100644 --- a/source/engineer/engineer.cpp +++ b/source/engineer/engineer.cpp @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include @@ -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(); }