title: Weird GLSL error with textures, why do I get an invalid operation when running a shader?
body: <p>I have a simple <em>GLSL 1.2</em> shader which accumulates values from five textures. 
  The shader compiles just fine.
  My problem is , when rendering a simple triangle with this shader activated, nothing gets drawn, and <code>glGetError()</code> returns invalid operation.</p>
  
  <p>However, if I only utilize three of the textures, everything runs just fine. If I activate another shader before rendering the triangle, everything runs fine aswell.</p>
  
  <p>Seems like there is something about textures and shaders I don't seem to know, any ideas on why I would get an invalid operation from running a shader?</p>
  
  <p><em>Update:</em></p>
  
  <ul>
  <li>The problems occurs on both Nvidia, ATI and software MESA rendering.</li>
  <li>There are no glErrors while uploading textures, activating textures, activating the shader, setting uniforms to the shader, the gl error occurs after rendering one simple triangle.</li>
  <li>The textures are accesed only in the fragment shader.</li>
  </ul>