Programs from one program object cannot come between two shader stages that are defined by different program object.In the case of a unified program, these would all be linker errors, but program pipelines have to check at render-time: Program pipeline objects have additional rules.Any active programs cannot have two or more image variables of different types which are associated with the same image unit.Any active programs cannot have two or more sampler variables of different types which are associated with the same texture image unit.If there is an active Tessellation Evaluation Shader or Geometry Shader, then there must also be an active Vertex Shader present.The current program object or program pipeline object must be successfully linked and valid for the current state.
The Default Framebuffer (if present) is always complete, so this usually happens with Framebuffer Objects.
The current framebuffer must be complete.A non-zero Vertex Array Object must be bound (though no arrays have to be enabled, so it can be a freshly-created vertex array object).The following represent conditions you must ensure are valid when issuing a drawing command. The GL_INVALID_OPERATION error can happen when issuing any drawing command for many reasons, most of which have little to do with the actual drawing command itself.