I am trying to do some image processing on the GPU, e.g. median, blur, brightness, etc. The general idea is to do something like this framework from GPU Gems 1.

I am able to write the GLSL fragment shader for processing the pixels as I've been trying out different things in an effect designer app.

I am not sure however how I should do the other part of the task. That is, I'd like to be working on the image in image coords and then outputting the result to a texture. I am aware of the gl_FragCoords variable.

As far as I understand it it goes like that: I need to set up a view (an orthographic one maybe?) and a quad in such a way so that the pixel shader would be applied once to each pixel in the image and so that it would be rendering to a texture or something. But how can I achieve that considering there's depth that may make things somewhat awkward to me...

I'd be very grateful if anyone could help me with this rather simple task as I am really frustrated with myself.

UPDATE: It seems I'll have to use an FBO, getting one like this: glBindFramebuffer(...)