views:

364

answers:

1

Hi!

In a Qt based application I want to execute a fragment shader on two textures (both 1000x1000 pixels).
I draw a rectangle and the fragment shader works fine.

But, now I want to renderer the output into GL_AUX0 frame buffer to let the result read back and save to a file.

Unfortunately if the window size is less than 1000x1000 pixels the output is not correct. Just the window size area is rendered onto the frame buffer.

How can I execute the frame buffer for the whole texture?

Thanks, Gabor

+1  A: 

The recommended way to do off-screen processing is to use Framebuffer Objects (FBO). These buffers act similar the render buffers you already know, but are not constrained by the window resolution or color depths. You can use the GPGPU Framebuffer Object Class to hide low-level OpenGL commands and use the FBO right away. If you prefer doing this on your own, have a look at the extension specification.

Malte Clasen
Thanks for your help!
Vereb