title: GLSL uniform always zero for Qt arrays
body: <p>I'm working with Qt. I have multiple shaders working, however passing uniform arrays seems always to set all to zero. The expected result would be that random circles are drawn on top of the texture (or just a transparent texture due to too many circles).. What I get is a single particle circle on the lower right corner.</p>
  
  <pre><code>if (program-&gt;isLinked()) {
      QVector3D hitPoints[40];
  
      for (int k = 0; k &lt; 40; k++) {
          hitPoints[k] = QVector3D((float)rand()/(float)RAND_MAX, (float)rand()/(float)RAND_MAX, (float)rand()/(float)RAND_MAX);
      }
  
      program-&gt;setUniformValueArray("hitPoints", hitPoints, 40);
      program-&gt;bind();
  }
  </code></pre>
  
  <p>Fragment Shader:</p>
  
  <pre><code>uniform sampler2D color_texture;
  uniform vec3 hitPoints[40];
  
  
  void main()
  {
      float dist = 0.3;
     vec2 texcoord = vec2(gl_TexCoord[0]);
     for (int i = 0; i &lt; 40; i++) {
         float close = sqrt(pow(hitPoints[i].y - texcoord.y, 2) + pow(hitPoints[i].x - texcoord.x, 2));
         if (close &lt; dist) {
              gl_FragColor = vec4(0,0,0,texture2D(color_texture, texcoord).a);
              return;
         } 
     }
     gl_FragColor = texture2D(color_texture, texcoord);
  }
  </code></pre>