glUniform4fv is giving GL_INVALID_OPERATION
Adding my comment as an answer, since it turned out to be the solution:
The only causes from that list that I could imagine are points 2 and 3:
- the size of the uniform variable declared in the shader does not match the size indicated by the glUniform command.
- one of the signed or unsigned integer variants of this function is used to load a uniform variable of type float, vec2, vec3, vec4, or an array of these, or if one of the floating-point variants of this function is used to load a uniform variable of type int, ivec2, ivec3, ivec4, unsigned int, uvec2, uvec3, uvec4, or an array of these.
So make sure that the corresponding uniform variable is really declared as vec4
in the shader (maybe it's a vec3
?).