How to enable light when using color infomation

Dear all,
I try to use color and light simutaneously in my program:

for(int k=0;k<m;k++)
glColor3f( , ,);
glNormal3f( , , );
glVertex3f( , , );

Even though I have enabled light and glCololMaterial(), still I can not see the light effect, any hints?

1 This is not an advanced topic.

2 Typically you would use glMaterial()

3 How do you set up your lighting? Do you actually call glEnable(GL_LIGHTING)?

4 Have you looked at any of the 14 Billion tutorials available on the Web?

OpenGL does not support light and colour at the same time.

Yes it does. Where’d you get the idea that you cant use color and lighting at the same time? Look up GL_COLOR_MATERIAL.

hm you were really assuming that I was NOT joking?