Commit 5be7742b authored by Ellen Dekkers's avatar Ellen Dekkers
Browse files

GlutPrimitiveNode: DrawMode SOLID_FACES_COLORED supported

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@9058 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 9e9fc7f7
......@@ -129,7 +129,8 @@ availableDrawModes() const
DrawModes::WIREFRAME |
DrawModes::HIDDENLINE |
DrawModes::SOLID_FLAT_SHADED |
DrawModes::SOLID_SMOOTH_SHADED );
DrawModes::SOLID_SMOOTH_SHADED |
DrawModes::SOLID_FACES_COLORED );
}
//----------------------------------------------------------------------------
......@@ -166,6 +167,19 @@ draw(GLState& _state, DrawModes::DrawMode _drawMode)
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
}
if (_drawMode & DrawModes::SOLID_FACES_COLORED)
{
glDisable(GL_LIGHTING);
glShadeModel(GL_FLAT);
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE);
glColor(primitives_[i].color);
draw_obj(i);
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
}
if (_drawMode & DrawModes::HIDDENLINE)
{
......
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