title: glGetAttribLocation returns -1 after more than one uniform is set
body: <p>I want to create program which converts RGB to YCbCr so I need set transform matrix and vector as uniform. When i call <code>glUniform</code> more than once <code>glGetAttribLocation</code> returns <code>-1</code>. Here is my code.</p>
  
  <p>Fragment Shader</p>
  
  <pre><code>#version 410
  precision highp float;
  
  uniform sampler2D u_texture;
  uniform mat3 u_ycbcr_matrix;
  uniform mat3 u_ycbcr_vector;
  
  out vec4 color;
  
  in vec2 v_coord;
  
  void main() {
      color = texture(u_texture, v_coord) + vec4(u_ycbcr_matrix[0], 1);
  }
  </code></pre>
  
  <p>C++ code</p>
  
  <pre><code>void ScreenQuad::createProgram(ShaderProgram * program, string vsPath, string fsPath){
  shaderProgram = *program;
  shaderProgram.loadVertexShader(vsPath);
  shaderProgram.loadFragmentShader(fsPath);
  shaderProgram.link();
  
  GLint attr = glGetAttribLocation(program -&gt; getShaderProgram(), "position");
  if (attr &lt; 0) {
      fprintf(stdout, "Nieprawidlowy parametr: position");
  }
  
  glVertexAttribPointer(attr, 2, GL_FLOAT, GL_FALSE, 2 * sizeof(GLfloat), 0);
  glEnableVertexAttribArray(attr);
  
  shaderProgram.use();
  program -&gt; setUniforms();
  glUniform1i(glGetUniformLocation(shaderProgram.getShaderProgram(), "u_texture"), 0);
  
  int total = -1;
  glGetProgramiv( shaderProgram.getShaderProgram(), GL_ACTIVE_UNIFORMS, &amp;total );
  for(int i=0; i&lt;total; ++i)  {
      int name_len=-1, num=-1;
      GLenum type = GL_ZERO;
      char name[100];
      glGetActiveUniform( shaderProgram.getShaderProgram(), GLuint(i), sizeof(name)-1,
                          &amp;name_len, &amp;num, &amp;type, name );
      name[name_len] = 0;
      GLuint location = glGetUniformLocation(shaderProgram.getShaderProgram(), name);
      fprintf(stdout, "\n --- %s : %d---", name, location);
  }
  
  shaderPrograms.push_back(shaderProgram);}
  
  
  ShaderProgram RGB2YCbCr::setUniforms() {
      GLuint program = getShaderProgram();
      fprintf(stdout, "\n+++ %d +++ \n", glGetUniformLocation(program, "u_ycbcr_matrix"));
      glUniformMatrix3fv(glGetUniformLocation(program, "u_ycbcr_matrix"), 1, GL_FALSE, ycbcr_matrix);
  
      fprintf(stdout, "\n+++ %d +++ \n", glGetUniformLocation(program, "u_ycbcr_vector"));
      glUniform3fv(glGetUniformLocation(program, "u_ycbcr_vector"), 1, ycbcr_vector);
  };
  </code></pre>