Why no per-vertex material specification in vertex array?

I keep wondering…why is there no glMaterialPointer() call or something to that effect for vertex arrays? You can call glMaterial() between a glBegin()/glEnd() block to change the current material in the middle of the vertex list…so why not the same when you specify a vertex list with glDrawElements() or glDrawArrays()? (and the darn thing is that there IS a glColorPointer() call! But I’m only interested in colors as a result of shading…)

PS: for that matter…why can’t calls that change the current texture(like glBindTexture() or glTexImage2D() etc) be nested inside a glBegin()/glEnd() block? Or to take it further…a glBindTexturePointer() call for vertex arrays?

Very Perplexed!

When drawing geometry, batch polys up into material types and texture types. switching textures is very slow so should be done as few times as possible.

As for materials, you can make use of an array of colours, and enable glColorMaterial. You cant control all attributes at once (ie, only control one of GL_AMBIENT,GL_DIFFUSE,GL_SPECULAR or GL_AMBIENT_AND_DIFFUSE).

This is as flexible as it gets…