]> git.tdb.fi Git - r2c2.git/commitdiff
Match changes in GL::Pipeline API
authorMikko Rasa <tdb@tdb.fi>
Thu, 17 Jan 2013 12:34:17 +0000 (14:34 +0200)
committerMikko Rasa <tdb@tdb.fi>
Thu, 17 Jan 2013 12:34:17 +0000 (14:34 +0200)
source/3d/view.cpp
source/designer/designer.cpp
source/engineer/engineer.cpp
source/engineer/trainview.cpp

index 002d4800e82baf640b31fdf2dbcda5ea9287f86c..4cd553d48575accca0ddcae31b83044dfd83e9aa 100644 (file)
@@ -15,9 +15,9 @@ View3D::View3D(Layout3D &l, unsigned w, unsigned h):
        pipeline.set_camera(&camera);
        pipeline.add_renderable_for_pass(layout.get_scene(), 0);
 
-       GL::PipelinePass *pass = &pipeline.add_pass(0);
-       pass->lighting = &layout.get_lighting();
-       pass->depth_test = &GL::DepthTest::lequal();
+       GL::Pipeline::Pass *pass = &pipeline.add_pass(0);
+       pass->set_lighting(&layout.get_lighting());
+       pass->set_depth_test(&GL::DepthTest::lequal());
 
        camera.set_up_direction(GL::Vector3(0, 0, 1));
        // Y+, 60° down
@@ -45,7 +45,7 @@ void View3D::view_all(bool tight)
 
 void View3D::render()
 {
-       pipeline.render_all();
+       pipeline.render();
 }
 
 } // namespace R2C2
index 07c2f785f5a68299d0023439e13c2904412f6edb..c5f40bd8d6cdc281e4468ad12d07c6d2a13bfdd4 100644 (file)
@@ -87,17 +87,17 @@ Designer::Designer(int argc, char **argv):
        main_view = new View3D(*layout_3d, window.get_width(), window.get_height());
        GL::Pipeline *pipeline = &main_view->get_pipeline();
 
-       GL::PipelinePass *pass = &pipeline->add_pass("unlit");
-       pass->depth_test = &GL::DepthTest::lequal();
-       pass->blend = &GL::Blend::alpha();
+       GL::Pipeline::Pass *pass = &pipeline->add_pass("unlit");
+       pass->set_depth_test(&GL::DepthTest::lequal());
+       pass->set_blend(&GL::Blend::alpha());
 
        pass = &pipeline->add_pass("blended");
-       pass->lighting = &layout_3d->get_lighting();
-       pass->depth_test = &GL::DepthTest::lequal();
-       pass->blend = &GL::Blend::alpha();
+       pass->set_lighting(&layout_3d->get_lighting());
+       pass->set_depth_test(&GL::DepthTest::lequal());
+       pass->set_blend(&GL::Blend::alpha());
 
        pass = &pipeline->add_pass("overlay");
-       pass->blend = &GL::Blend::alpha();
+       pass->set_blend(&GL::Blend::alpha());
 
        if(base_object)
                pipeline->add_renderable(*base_object);
index 7d1e227e7e4a63112759d9c49518ed6a7bd372d4..8b0c6b72bd2d1cf2b50e896ae4437f6e164e4640 100644 (file)
@@ -98,15 +98,15 @@ Engineer::Engineer(int argc, char **argv):
        lighting.set_ambient(GL::Color(0.4));
        lighting.attach(0, light);
 
-       GL::PipelinePass *pass = &pipeline.add_pass(0);
-       pass->depth_test = &GL::DepthTest::lequal();
-       pass->lighting = &lighting;
+       GL::Pipeline::Pass *pass = &pipeline.add_pass(0);
+       pass->set_depth_test(&GL::DepthTest::lequal());
+       pass->set_lighting(&lighting);
 
        pass = &pipeline.add_pass("unlit");
-       pass->depth_test = &GL::DepthTest::lequal();
+       pass->set_depth_test(&GL::DepthTest::lequal());
 
        pass = &pipeline.add_pass("overlay");
-       pass->blend = &GL::Blend::alpha();
+       pass->set_blend(&GL::Blend::alpha());
 
        view_all();
 
@@ -196,7 +196,7 @@ void Engineer::tick()
 
        GL::Framebuffer::system().clear(GL::COLOR_BUFFER_BIT|GL::DEPTH_BUFFER_BIT);
 
-       pipeline.render_all();
+       pipeline.render();
 
        if(pointer_moved)
        {
index c3d96fdc2fd78af194ffca98a99396cac287595e..1ab236f4c797a7464bc7e42d5d8369d92b89febd 100644 (file)
@@ -33,9 +33,9 @@ TrainView::TrainView(Engineer &e, const Train &t):
 
        pipeline.add_renderable(engineer.get_layout_3d().get_scene());
 
-       GL::PipelinePass *pass = &pipeline.add_pass(0);
-       pass->depth_test = &GL::DepthTest::lequal();
-       pass->lighting = &engineer.get_lighting();
+       GL::Pipeline::Pass *pass = &pipeline.add_pass(0);
+       pass->set_depth_test(&GL::DepthTest::lequal());
+       pass->set_lighting(&engineer.get_lighting());
 
        GLtk::Image *image;
        add(*(image = new GLtk::Image(&tex)));
@@ -111,7 +111,7 @@ void TrainView::prepare()
 
        GL::Bind _bind_fbo(fbo);
        fbo.clear(GL::COLOR_BUFFER_BIT|GL::DEPTH_BUFFER_BIT);
-       pipeline.render_all();
+       pipeline.render();
 }
 
 void TrainView::button_release(int x, int y, unsigned btn)