   glGetUniformLocation strange returning result
  Hello, this is happening to me://fragment shaderuniform tex2D texture;uniform tex2D texture2;...But when i try to get the uniform locations i get something like this:t1 = glGetUniformLocation(program,"texture"); //returns 0t2 = glGetUniformLocation(program,"texture2"); //returns -1!!why the -1? if the uniform is there? if i change the names, sometimes i just get -1 always... wtf? is driving me crazy.Have you ever gone through this?   
  Are you actually using texture2 for anything in your shader? If it does not directly effect the output, it will be optimized out by GLSL compiler, and thus you cannot get the location anymore.   ;  uhmm ineresting... sometimes i se it, sometimes i don't since i'm doing some testing...