You should look it up in the redbook to be certain, but I’m not sure you can.
If I remember correctly, glColor is equivalent to glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, m_AmbientDiffuse)
Apart from that, though, you have to remember that OpenGL maintains state. If you set the color using glColor in one object, that color will remain active until you replace it with another color.
Also, it would help if you told us what the value for “method” is.
By the way, you’re doing a check on “method && 2” - but that is not a bitwise AND, it is a logical AND. Which means that it’s only a check on whether or not “method” is non-zero.
If you want a bitwise AND, you should replace it with “method & 2”. But if you do, you should also realise that currently your comparisons will not fire when method=1/4/5/12/13 etc.
I believe that you want to show the colored polygon when method is equlivalent to 0–Yes?
If it’s the case, you should disable the lighting to get the correct result.
So:
if(method && 2)
{
//***Enable the lighting
glEnable( GL_LIGHTING );
//glColor3f(1.0,1.0,1.0);
glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, m_AmbientDiffuse);
glMaterialfv(GL_FRONT, GL_SPECULAR, m_Specular);
glMaterialfv(GL_FRONT, GL_SHININESS, &( m_Specular[4]));
glMaterialfv(GL_FRONT, GL_EMISSION, m_Emission);
}