]> git.tdb.fi Git - r2c2.git/blobdiff - source/engineer/trainview.cpp
Perform check_slope automatically with certain operations
[r2c2.git] / source / engineer / trainview.cpp
index c3d96fdc2fd78af194ffca98a99396cac287595e..79f9c946f82a51eef1865ea90a0433949d69f22f 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)));
@@ -86,7 +86,7 @@ void TrainView::prepare()
 {
        const Vehicle &veh = train.get_vehicle(0);
        const Vector &pos = veh.get_position();
-       float angle = veh.get_direction();
+       float angle = veh.get_rotation();
        if(!forward)
                angle += M_PI;
        float c = cos(angle);
@@ -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)