Commit ed4926d6 authored by Henrik Zimmer's avatar Henrik Zimmer
Browse files

Bug fix: LineSegment mode when no colors are specified

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@14562 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 9b1def34
......@@ -121,8 +121,10 @@ draw(GLState& /* _state */ , const DrawModes::DrawMode& _drawMode)
// glBegin(GL_LINE_STRIP);
if ((line_mode_ == LineSegmentsMode))
{
// first check if (new standard) 4-channel colors are specified
if ((line_mode_ == LineSegmentsMode) && (points_.size()/2 == colors4f_.size()) )
if( (points_.size()/2 == colors4f_.size()) )
{
// enable blending of lines
GLboolean blendb;
......@@ -206,6 +208,20 @@ draw(GLState& /* _state */ , const DrawModes::DrawMode& _drawMode)
glEnd();
}
else
{
glBegin(GL_LINES);
ConstPointIter p_it=points_.begin(), p_end=points_.end();
for (; p_it!=p_end; ++p_it)
{
glVertex(*p_it);
}
glEnd();
}
}
else
{
glBegin(GL_LINE_STRIP);
ConstPointIter p_it=points_.begin(), p_end=points_.end();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment