FBO and multipass


I first render my scene in a 256256 texture using FBO, and finally to the actual frame buffer (which is sized 640480) and try to correlate the data between the texture and the pixel beeing rendered on the actual frame buffer.
What seems to happen is that rendering to the texture exceed the texture’s limits: compared to the 640480 frame buffer, only the first 256256 bottom-left pixels of it are rendered, the rest of the render is outside the texture.

I thought setting my FBO camera transform exactly the same way (with gluPerspective and gluLookAt) as for frame buffer would be enough to have the same rendering area on both FBO and Frame Buffer but it seems not.

Did I missed something ?

Have you restricted your viewport to 256x256 when rendering to your FBO ?

Yes, it works now :stuck_out_tongue:

But FBO doesn’t seems to remember glviewport parameters, I have to set it each time I use Frame Buffer and FBO. I hope this is not too much time consuming.