gouraud shading

hi guys…

i want to know…can i produce Gouraud Shading using OpenGL? if it can…can u guys out there show me how to do the source codes?

glShadeModel(GL_SMOOTH) to enable gouraud shading. But you shouldn’t have to do anything at all to get gouraud, because it’s enabled by default.

hum, just don’t forget to give one normal by vertex …

i dun quite understand actually…can u explain it a lil more detail?

Gouraud shading is enabled by default, and there is nothing you have to do to enable it. Just try it out by passing a triangle with different colors for each vertex.

glBegin(GL_TRIANGLES);
glColor3f(…);
glVertex3f(…);
glColor3f(…);
glVertex3f(…);
glColor3f(…);
glVertex3f(…);
glEnd();

… for example. Just insert proper values and run.

Normals is just for lightning and sphere mapping (in the core at least, not counting extensions).