title: OpenGL light direction reversed while drawing into a framebuffer texture
body: <p>I've got an iPhone (OpenGL ES 1.1) app that does some rendering into textures. I'm setting up a framebuffer object and using glFramebufferTexture2D to attach the texture to it.</p>
  
  <p>Everything works fine except that the light directions are reversed when drawing into this framebuffer object. I'm specifying light directions like this:</p>
  
  <pre><code>float theDirection[4] = { x, y, z, 0 }
  glLightf( lightIndex, GL_POSITION, theDirection )
  </code></pre>
  
  <p>When rendering without the framebuffer object, all my light directions are correct. When rendering with the framebuffer object, I have to negate theDirection for things to look the same.</p>
  
  <p>As a side note, the light directions are also reversed (with or without a framebuffer object) when I'm running on an iPhone 3G with iOS 3.2. If I'm running on an iPhone or iPad on 4.x, the light directions are not reversed.</p>
  
  <p>Any ideas?</p>