``There is a bit strange small road start with the station. It is parallel to the main street and almost tangential direction, but not normal.'' ... Robert explained how to reach his home.
glEnable(GL_COLOR_MATERIAL); glColorMaterial(GL_FRONT, GL_DIFFUSE); glColor4fv(base_color);But in this way, always next object is affected. Because glColorMaterial sets the material color from the current color. Therefore, the following code is correct.
glColor4fv(base_color); // set the current color first. glEnable(GL_COLOR_MATERIAL); glColorMaterial(GL_FRONT, GL_DIFFUSE); // use current color