PDA

View Full Version : FBO and multipass



divide
03-23-2005, 10:25 PM
Hello,

I first render my scene in a 256*256 texture using FBO, and finally to the actual frame buffer (which is sized 640*480) 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 640*480 frame buffer, only the first 256*256 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 ?

Zeross
03-23-2005, 11:18 PM
Have you restricted your viewport to 256x256 when rendering to your FBO ?

divide
03-24-2005, 12:07 AM
Yes, it works now :p

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.