title: opengl glMaterialfv vs glMaterialiv
body: <p>While passing material data to opengl (to be used in a shader):</p>
  
  <pre><code>
  float white[4] ={1.0f,1.0f,1.0f,1.0f};
  
  glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, white);
  glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, white);
  glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, white);
  </code></pre>
  
  <pre><code>
  int whitei[4] = {255,255,255,255};
  glMaterialiv(GL_FRONT_AND_BACK, GL_AMBIENT, whitei);
  glMaterialiv(GL_FRONT_AND_BACK, GL_DIFFUSE, whitei);
  glMaterialiv(GL_FRONT_AND_BACK, GL_SPECULAR, whitei);
  </code></pre>
  
  <p>First one works beautifuly, but the second one only gives a black mesh. Both were used in the exact same context (basically I wrote the first one and then the second one replaced the first).</p>
  
  <p>Does anyone have any idea why that is? glMaterialiv would really make my life easier (if I can get it to work) because I keep my colors as rgba bytes and I'm not sure if I want to make them 4 times bigger just to convert them to float.</p>