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
void View3D::render()
{
- pipeline.render_all();
+ pipeline.render();
}
} // namespace R2C2
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);
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();
GL::Framebuffer::system().clear(GL::COLOR_BUFFER_BIT|GL::DEPTH_BUFFER_BIT);
- pipeline.render_all();
+ pipeline.render();
if(pointer_moved)
{
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)));
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)