main_panel->set_position(0, window.get_height()-main_panel->get_geometry().h);
main_panel->set_visible(true);
- overlay = new Overlay3D(window, camera, ui_res.get_default_font());
+ overlay = new Overlay3D(ui_res.get_default_font());
// Setup railroad control
DataFile::load(catalogue, "tracks.dat");
pipeline.set_camera(&camera);
pipeline.add_renderable_for_pass(layout_3d.get_scene(), 0);
pipeline.add_renderable_for_pass(layout_3d.get_path_scene(), "unlit");
+ pipeline.add_renderable_for_pass(*overlay, "overlay");
light.set_position(GL::Vector4(0, -0.259, 0.966, 0));
light.set_diffuse(GL::Color(0.9));
pass = &pipeline.add_pass("unlit");
pass->depth_test = &GL::DepthTest::lequal();
+ pass = &pipeline.add_pass("overlay");
+ pass->blend = &GL::Blend::alpha();
+
view_all();
// Catch various signals so we can stop the trains in case we get terminated
GL::Framebuffer::system().clear(GL::COLOR_BUFFER_BIT|GL::DEPTH_BUFFER_BIT);
pipeline.render_all();
- {
- GL::Bind blend(GL::Blend::alpha());
- overlay->render(0);
- }
if(pointer_moved)
{