- pipeline.render();
-
- if(pointer_moved)
- {
- pointer_moved = false;
-
- if(picking)
- {
- Track *track = pick_track(pointer_x, window.get_height()-pointer_y-1);
- if(track && track!=picking_track)
- {
- picking_track = track;
- if(picking_entry>=0)
- picking_entry = 0;
-
- delete picking_path;
- picking_path = new Path3D(layout_3d.get_track(*track));
- if(picking_entry>=0)
- picking_path->set_mask(picking_track->get_type().get_endpoint(picking_entry).paths);
- else
- picking_path->set_mask(picking_track->get_type().get_paths());
- picking_path->set_color(GL::Color(0));
- picking_path->set_layer(1);
- }
- }
- }
-
- if(picking && picking_track && picking_entry>=0)
- {
- GL::MatrixStack::Push push_mat(GL::MatrixStack::modelview());
-
- float rot = picking_track->get_endpoint_direction(picking_entry);
- Vector pos = picking_track->get_endpoint_position(picking_entry);
-
- GL::MatrixStack::modelview() *= GL::Matrix::translation(pos.x, pos.y, pos.z+0.03);
- GL::MatrixStack::modelview() *= GL::Matrix::rotation(rot+M_PI, 0, 0, 1);
-
- arrow_mesh.draw();
- }