Commit 346b72bb authored by Jan Möbius's avatar Jan Möbius
Browse files

Enable shading for per vertex coloring

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@9741 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 4cd56d34
......@@ -290,10 +290,16 @@ draw(GLState& _state, DrawModes::DrawMode _drawMode) {
if ( ( _drawMode & DrawModes::SOLID_POINTS_COLORED ) && mesh_.has_vertex_colors() )
{
glDisable(GL_LIGHTING);
glEnable(GL_LIGHTING);
glShadeModel(GL_SMOOTH);
glDepthRange(0.01, 1.0);
enable_arrays( VERTEX_ARRAY | COLOR_VERTEX_ARRAY );
if ( enableNormals_ ) {
glEnable(GL_COLOR_MATERIAL);
enable_arrays( VERTEX_ARRAY | COLOR_VERTEX_ARRAY | NORMAL_VERTEX_ARRAY );
} else {
glDisable(GL_COLOR_MATERIAL);
enable_arrays( VERTEX_ARRAY | COLOR_VERTEX_ARRAY );
}
draw_faces(PER_VERTEX);
glDepthRange(0.0, 1.0);
}
......
Supports Markdown
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