Material colors problem

mrbil:
Thanks for your detailed explanation.
though, I still get the same results…
if I use glMaterial, and specifically call glDisable(GL_COLOR_MATERIAL), even I never enabled it, I get the entire strip in the color of the last vertex.
if I use glEnable(GL_COLOR_MATERIAL) , and call glColorMaterial with the switches I want to go up, and then call glColor* inside glBegin - glEnd, I get the same results, the entire strip is in the last vertex color.
THE ONLY way I see the strip in different colors is if I turn off the lights (glDisable(GL_LIGHTING)) and then call glColor* between glBegin and glEnd.
Deiussum:
it is a problem for me to upload the code, but I will be happy to mail it to anyone that think he can help.

Hi, I’ll take a look, but first I need to be able to read the code

// Lights properties
float ambientProperties = { 0.2f, 0.2f, 0.2f, 1.0f};
float diffuseProperties = { 0.5f, 0.5f, 0.5f, 1.0f};
float specularProperties = { 0.1f, 0.1f, 0.1f, 1.0f};

//enable lighting.
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
glEnable(GL_LIGHT1);

glLightfv(GL_LIGHT0, GL_AMBIENT, ambientProperties);
glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuseProperties);
glLightfv(GL_LIGHT0, GL_SPECULAR, specularProperties);

glLightfv(GL_LIGHT1, GL_AMBIENT, ambientProperties);
glLightfv(GL_LIGHT1, GL_DIFFUSE, diffuseProperties);
glLightfv(GL_LIGHT1, GL_SPECULAR, specularProperties);

//set the lighting position
setLightPosition();

glShadeModel(GL_SMOOTH);
glEnable(GL_NORMALIZE);

//set the black default clear color
float black[4] = {0.0f, 0.0f, 0.0f, 1.0f};
setBcgColor(black);

//enable the Z buffer
glEnable(GL_DEPTH_TEST);

/* and the function I fill the display list is: */

GLfloat SurfaceColor[4];

//make sure that there is content to draw
if(!isValid())
return false;

//create/replace the list located at listNumber
glNewList(listNumber,GL_COMPILE);
glColor3f (1.0, 1.0, 1.0);

//check according to the transparency level of the object
//if to enable a blending function
if( getAlphaTransparencyLevel() < 1.0f )
{
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND);
glDepthMask (GL_FALSE);
}

//render the trinagle strip
glBegin(GL_TRIANGLE_STRIP);
for( int i=0 ; i < getVerticesArraySize(); i++ )
{
CVertex& v = getVertex(i);

  //set the vertex normal 
  glNormal3f(v.getNormal().getX(), v.getNormal().getY(), v.getNormal().getZ());
  SurfaceColor[0] = v.getColor().getRedValue();
  SurfaceColor[1] = v.getColor().getGreenValue();
  SurfaceColor[2] = v.getColor().getBlueValue();
  SurfaceColor[3] = v.getColor().getAlphaValue();

  //set the vertex color (ambient diffuse and 
  //specular properties
  glMaterialfv(GL_FRONT_AND_BACK,GL_AMBIENT_AND_DIFFUSE , SurfaceColor);
  glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR,SurfaceColor);

  //set the vertex geometry.
  glVertex3f(v.getX(), v.getY(), v.getZ()); 

}
glEnd();

//if we were drawing a transparent object turn off the
//blending function and turn back on the Z buffer
if( getAlphaTransparencyLevel() < 1.0f )
{
glDepthMask(GL_TRUE);
glDisable(GL_BLEND);
}

glEndList();

return true;

OK, PROBLEM SOLVED.
I thought about it and came to the obvious conclusion this is not a code problem !!!
but I did tested it on two different computers…so I went and checked on the other computer to see what the hardware spec is, and they have ALMOST nothing in common except…you guessed it the same stupid ATI card…so I went to a third computer with a ge-force 3 card and…everything works fine…
my bad I should have checked it in the first place…sorry…
thanks any how to all of you that tried to help.