- const Marklin::Block::Endpoint &bep=placing_block->get_endpoints()[placing_entry];
- float rot=bep.track->get_endpoint_direction(bep.track_ep);
- Point pos=bep.track->get_endpoint_position(bep.track_ep);
- GL::push_matrix();
- GL::translate(pos.x, pos.y, pos.z+0.03);
- GL::rotate(rot*180/M_PI+180, 0, 0, 1);
- GL::Texture::unbind();
- glColor4f(1, 1, 1, 1);
- glBegin(GL_TRIANGLE_FAN);
- glVertex2f(0.08, 0);
- glVertex2f(0.05, 0.03);
- glVertex2f(0.05, 0.01);
- glVertex2f(0, 0.01);
- glVertex2f(0, -0.01);
- glVertex2f(0.05, -0.01);
- glVertex2f(0.05, -0.03);
- glEnd();
- GL::pop_matrix();
- }
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(0, screen_w, 0, screen_h, 0, 1);
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();