title: GLSL uniform arrays incorrect values
body: <p>I am trying to pass light and lightcolor information to my shader via a uniform array.
  I declared these in my shader like this:</p>
  
  <pre><code>     uniform vec2 lightpositions[4];
       uniform vec4 lightcolors[4];
  </code></pre>
  
  <p>And in my code (C++):</p>
  
  <pre><code>float lightpositions[8] = { 
          150, 150,
          (float) screenWidth - 150, 150,
          (float) screenWidth - 150, (float) screenHeight - 150,
          150, (float) screenHeight - 150
  };
  
  float lightcolors[16] = {
          1.0, 0.0, 0.0, 1.0,
          1.0, 1.0, 0.0, 1.0,
          1.0, 0.0, 1.0, 1.0,
          0.0, 1.0, 1.0, 1.0
  };
  
  glUniform2fv(lightposHandle, amount, lightpositions);
  checkGlError("lightPositions");
  
  glUniform4fv(lightcolorHandle, amount, lightcolors);
  checkGlError("lightColors");
  </code></pre>
  
  <p>Where amount is 4 in this case.</p>
  
  <p>When I check my OpenGL ES debugger (PerfHud ES) I see that the values in the arrays are almost random like 1.4e+02.</p>
  
  <p>Am I doing something wrong? Or should I use attributes in this case?</p>