Original Post
I've been writing a nice shiny new lighitng system, but have run into a small snag... I can render the new lighting stuff (a texture to which I have drawn an appropriate lighting mask), but when I move my camera, the lights (which are holes punched through an opaque cover) don't seem to move at the same rate as the underlying scene. I use the same camera placement code in the FBO (to make the texture) rendering context as I do in the underlying scene. The only real difference I can think of is that the local Z coords happen to be set up backwards between the two (but that shouldn't have any effect on horizontal camera movement, I think).
The relevant camera code is:
gluLookAt( Position.x,Position.y,Position.z,
ViewPoint.x,ViewPoint.y,ViewPoint.z,
UpVector.x,UpVector.y,UpVector.z);
where ViewPoint = the sum of the Position and ViewDir 3d vectors, ViewDir = (0.0, 0.0, -1.0) (i've tried flipping the z coord for the camera setting in the z flipped FBO context with no apparant effect), and UpVector = (0.0, 1.0, 0.0).
I'm using an ortho projection for both the main scene and the FBO. I tried using gltranslated for the FBO local camera but that seemed to make the problem worse.
Sorry for reposting this, but I see the last one as having 0 views... that seems broken.
The relevant camera code is:
gluLookAt( Position.x,Position.y,Position.z,
ViewPoint.x,ViewPoint.y,ViewPoint.z,
UpVector.x,UpVector.y,UpVector.z);
where ViewPoint = the sum of the Position and ViewDir 3d vectors, ViewDir = (0.0, 0.0, -1.0) (i've tried flipping the z coord for the camera setting in the z flipped FBO context with no apparant effect), and UpVector = (0.0, 1.0, 0.0).
I'm using an ortho projection for both the main scene and the FBO. I tried using gltranslated for the FBO local camera but that seemed to make the problem worse.
Sorry for reposting this, but I see the last one as having 0 views... that seems broken.