title: Passing float to GLSL shader does nothing
body: <p>I've been having problems sending the shininess factor to my bump mapping shader.
  The result always looks like this: <a href="http://i.imgur.com/unzdx.jpg" rel="nofollow">http://i.imgur.com/unzdx.jpg</a></p>
  
  <p>But if I hard code the value inside the shader to 0.0 it's working just fine.
  When I send 0.0 to the shader it's turning out like in the picture above.</p>
  
  <p>Any ideas?</p>
  
  <p>Here's my shader</p>
  
  <pre><code>#version 110
  
  uniform sampler2D tex;
  uniform sampler2D bmap;
  
  uniform bool boolBump;
  uniform vec4 vecColor;
  uniform bool onlyColor;
  
  uniform float fTransparencyThresh;
  uniform float fShininess;
  uniform float alpha;
  
  varying vec3 vecLight;
  varying vec3 vecEye;
  varying vec3 vecNormal;
  
  vec4 getLighting()
  {
      //Ambient part
      vec4 color = (gl_FrontLightModelProduct.sceneColor * gl_FrontMaterial.ambient) + (gl_LightSource[0].ambient * gl_FrontMaterial.ambient);
  
      //For bump mapping, the normal comes from the bump map texture lookup
      vec3 n = normalize(vecNormal);
      if(boolBump)
      {
           n = normalize(texture2D(bmap, gl_TexCoord[0].st).xyz * 2.0 - 1.0);
      }
  
      vec3 l = normalize(vecLight);
  
      //Lambert term
      float NdotL = dot(n, l);
  
      if(NdotL &gt; 0.0)
      {
          //Diffuse part
          color += gl_LightSource[0].diffuse * gl_FrontMaterial.diffuse * max(0.0, NdotL);
  
          //Specular part
          vec3 e = normalize(vecEye);
          vec3 r = normalize(-reflect(l,n));  
  
          float spec = pow(max(0.0, dot(r, e)), fShininess);
  
          color += gl_LightSource[0].specular * gl_FrontMaterial.specular * spec;
      }
  
      return color;
  }
  
  void main(void)
  {
      vec4 texel = texture2D(tex, gl_TexCoord[0].st);
      if(texel.a &lt; fTransparencyThresh)
          discard;
  
      //Get shading
          vec4 color = getLighting();
  
      //Color only mode?
      if(onlyColor)
      {
          color *= vecColor;
      }
      else
      {
          color *= texel;
      }   
  
      //Set fragment color, alpha comes from MTL file
      gl_FragColor = vec4(color.xyz, alpha);
  }
  </code></pre>
  
  <p>Edit, OpenGL code:</p>
  
  <pre><code>void MyClass::sendToShader(const OBJ::StelModel* pStelModel, Effect cur, bool&amp; tangEnabled, int&amp; tangLocation)
  {
      int location;
      tangEnabled = false;
  
      if(cur != No)
      {
          location = curShader-&gt;uniformLocation("fTransparencyThresh");
          curShader-&gt;setUniform(location, fTransparencyThresh);
  
          location = curShader-&gt;uniformLocation("alpha");
          curShader-&gt;setUniform(location, pStelModel-&gt;pMaterial-&gt;alpha);
  
          location = curShader-&gt;uniformLocation("fShininess");
          curShader-&gt;setUniform(location, 0.0f);
  
  ...
  </code></pre>
  
  <p>Edit: Even this wont work:</p>
  
  <pre><code>GLint loc = glGetUniformLocation(curShader-&gt;program, "fShininess");
  glUniform1f(loc, 0.0f);
  </code></pre>