Commit 498b200a authored by Martin Schultz's avatar Martin Schultz

fixed further visualization mdoes for core profile

parent 75c31c58
......@@ -338,12 +338,15 @@ void MaterialNode::enter(GLState& _state, const DrawModes::DrawMode& _drawmode
{
materialBackup_.colorMaterial_ = glIsEnabled(GL_COLOR_MATERIAL);
if (material_.colorMaterial_ ) {
if(_state.compatibilityProfile())
{
if (material_.colorMaterial_ ) {
ACG::GLState::disable( GL_COLOR_MATERIAL );
glColorMaterial( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE );
ACG::GLState::enable( GL_COLOR_MATERIAL );
ACG::GLState::enable( GL_COLOR_MATERIAL );
} else
ACG::GLState::disable( GL_COLOR_MATERIAL );
}
}
}
......@@ -474,10 +477,13 @@ void MaterialNode::leave(GLState& _state, const DrawModes::DrawMode& _drawmode )
if ( ( applyProperties_ & ColorMaterial ) && ( _drawmode & DrawModes::SOLID_FACES_COLORED_FLAT_SHADED ) )
{
if(_state.compatibilityProfile())
{
if (materialBackup_.colorMaterial_ ) {
ACG::GLState::enable( GL_COLOR_MATERIAL );
} else
ACG::GLState::disable( GL_COLOR_MATERIAL );
}
}
}
......
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