I am using glMaterialfv and glLightfv to set the material and lights properties of an object.
I have a doubt about the size of the array that have to be passed as argument, the documentation I'm reading doesn't say anything about that.
For example:

Code :
glMaterialfv(GL_FRONT, GL_SHININESS, (const GLfloat[]) {1,0,0,0} );

But what if I pass an array of 3 glFloat's? Can this be done? And how do I change the format to choose if I want to pass a RGBA array or RGB?