glMaterialfv and GLSL shaders

Im having problems with materials and vertex shaders.
I have 3 glDrawElements calls on the same vertices. before each call to glDrawElements, i call

glMaterialfv(GL_FRONT,GL_AMBIENT,colord );
glMaterialfv(GL_FRONT,GL_DIFFUSE,colord );
glMaterialfv(GL_FRONT,GL_SPECULAR,colord );

These come into my GLSL vertex shader as gl_FrontMaterial.diffuse(ambient,specular)

The problem is that only the first glDrawElement call (glMaterialfv) materials are used even through the next 2 glDrawElements calls. If i reverse the order of the calls(and associated materials) then the first one is only used.

Any ideas why. Am I doing something wrong(most likely) or driver problem.

Well I did this. And it works.
How come with glMaterialf… doesnt work??
I did call glDisable(GL_COLOR_MATERIAL);


  glColorMaterial(GL_FRONT, GL_DIFFUSE );

  glColorMaterial(GL_FRONT,GL_AMBIENT );

  glColorMaterial(GL_FRONT, GL_SPECULAR);

Maybe you are running out of interpolators, or maybe driver just dont know how to arrange varyings/materials.

He didn’t mention he was interpolating the material properties, madman - he doesn’t mention fragment shaders at all. Sounds like he’s just doing simple lighting in a vertex shader.
Sounds a weird one, Joe.

Perhaps this is the time to request info about platform, gfx h/w and driver version?

From a quick glance it seems like a (driver) bug to me.