views:

336

answers:

1

Sorry if the question is too general, but what I mean is this; in OpenGL, before you perform a buffer swapping to make the buffer visible on the screen, there should be some function calls to perform some image processing. I mean, like blur the screen, twisting a portion of the screen, etc. or performing some interesting "touch up" like bloom, etc.

What are the keywords and sets of functions of OpenGL I should be looking for if I want to do what I have said above?

+3  A: 

Since you can't, in general, read/write to the framebuffer in the same operation (other than simple blending), you need to render to textures using FBO:s (FrameBufferObject), then do various processing on those, then do the final pass onto the real framebuffer.

That's the main part you need to understand. Given that, draw your "render tree", i.e. which parts of the scene goes where and what your effects are, their input and output data.

From there on, you just render one or more big quads covering the entire screen with specific fragment shader that perform your effect, using textures as input and one or more framebuffer objects as output.

Marcus Lindblom