Fixed rendering of line node in LineSegments mode. If the color was set via...
Fixed rendering of line node in LineSegments mode. If the color was set via MaterialNode::set_color() function, OpenFlipper crashed when rendering the line. This was due to the fact that one was supposed to set as many colors (via add_color()) as points. It was never checked whether we reached the end of the color vector. So I changed this such that as long as colors are set for the vertices, those are used. And as soon as we reach the end of the colors vector, the last used color is set for rendering the line. If no color is set at all, it defaults to white. git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@11133 383ad7c9-94d9-4d36-a494-682f7c89f535
Showing with 19 additions and 3 deletions