From: Mikko Rasa Date: Thu, 17 Jan 2013 12:45:52 +0000 (+0200) Subject: The Root widget can now set matrices itself X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=755d17ec7780ab0dfa83e17123043d37ccf257d0;p=r2c2.git The Root widget can now set matrices itself --- diff --git a/source/designer/designer.cpp b/source/designer/designer.cpp index c5f40bd..e67c36f 100644 --- a/source/designer/designer.cpp +++ b/source/designer/designer.cpp @@ -513,16 +513,8 @@ void Designer::render() measure.render(); } - GL::matrix_mode(GL::PROJECTION); - GL::load_identity(); - GL::ortho_bottomleft(window.get_width(), window.get_height()); - GL::matrix_mode(GL::MODELVIEW); - GL::load_identity(); - - GL::Bind bind_blend(GL::Blend::alpha()); root.render(); - // XXX Should fix GLtk so these would not be needed - GL::Texture::unbind(); + // XXX Should fix GLtk so this would not be needed glColor3f(1.0, 1.0, 1.0); } diff --git a/source/engineer/engineer.cpp b/source/engineer/engineer.cpp index 8b0c6b7..133aa2c 100644 --- a/source/engineer/engineer.cpp +++ b/source/engineer/engineer.cpp @@ -236,18 +236,7 @@ void Engineer::tick() arrow_mesh.draw(); } - const GLtk::Geometry &rgeom = root->get_geometry(); - GL::matrix_mode(GL::PROJECTION); - GL::load_identity(); - GL::ortho_bottomleft(rgeom.w, rgeom.h); - GL::matrix_mode(GL::MODELVIEW); - GL::load_identity(); - - { - GL::Bind blend(GL::Blend::alpha()); - root->render(); - GL::Texture::unbind(); - } + root->render(); window.swap_buffers(); }