tags:

views:

636

answers:

2

I've read that FBOs can be used for fast image manipulation using the OpenGL drawing actions. Does anyone know the basics of how to do this? or has some very simple example code illustrating it?

+2  A: 

Framebuffer Objects (FBO) are just a basic tool that cannot be used to manipulate images directly. If you know how to render your image manipulations in OpenGL to the screen, you can then use FBOs to render them off-screen. So they are in fact useful for this task, since you are not limited by the resolution of your screen and don't have to distract the user with thousands of flashing images. However, the manipulation itself happens in OpenGL, probably in the fragment shader.

Visit to the OpenGL forum to get some advice how to start with OpenGL basics. They also have quite a few links to sample code.

Malte Clasen
+2  A: 

Before you can use FBOs for image manipulation you need to know how to handle OpenGL, as a FBO can simply be used as a render target (output buffer for rendering operations). Once you're fluent with OpenGL and probably know how to do shader programming, you can do virtually everything with images in an FBO, and do it extremely fast.

A simpler approach might be to employ CUDA (NVidia) or Stream Computing (ATI) to harness a GPU's power for image manipulation, because these APIs are much closer to regular array-based C++ programming. Image manipulation may be somewhat slower that way than with OpenGL, but still way faster than with traditional CPU driven code.

karx11erx