OpenGL: Problems with lighting material [closed]

  ambient, c++, light, lighting, opengl

I am new to OpenGL and am having a lighting problem. When I set glMaterialfv, OpenGL stops using color of the object, and only takes it from the parameters that are specified in glMaterialfv. But without glMaterialfv color of object are show corectly
Can you explain to me what is happening.
I need exactly old OpenGL to complete my assignment at university

Source: Windows Questions C++