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.
Everything works fine except that the light directions are reversed when drawing into this framebuffer object. I'm specifying light directions like this:
float theDirection[4] = { x, y, z, 0 }
glLightf( lightIndex, GL_POSITION, theDirection )
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.
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.
Any ideas?