]> git.tdb.fi Git - r2c2.git/commitdiff
The Root widget can now set matrices itself
authorMikko Rasa <tdb@tdb.fi>
Thu, 17 Jan 2013 12:45:52 +0000 (14:45 +0200)
committerMikko Rasa <tdb@tdb.fi>
Thu, 17 Jan 2013 12:45:52 +0000 (14:45 +0200)
source/designer/designer.cpp
source/engineer/engineer.cpp

index c5f40bd8d6cdc281e4468ad12d07c6d2a13bfdd4..e67c36f71377dabf1f7973f4813505c153bc9ffc 100644 (file)
@@ -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);
 }
 
index 8b0c6b72bd2d1cf2b50e896ae4437f6e164e4640..133aa2cc815174bf76211459af064d986803c2a6 100644 (file)
@@ -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();
 }