glColor() problem

In my application when i am getting the current color, it gives (0,0,0,0). I am not calling glColor() function.

But in glColor() documentation i saw the following line.

The initial value for the current color is (1, 1, 1, 1).

What is the reason for that?

Kannan A S

Do you use any vertex arrays with a color buffer? If so, maybe black is the last color used in that array. Another thing is that you haven’t created a rendering context before getting the current color.

Why bother getting the color values? It is cheaper to always set the color, even when you are setting it to the current color (according to the red book)