Framebuffer Object
Encyclopedia
The frame buffer object architecture (FBO) is an extension to OpenGL
OpenGL
OpenGL is a standard specification defining a cross-language, cross-platform API for writing applications that produce 2D and 3D computer graphics. The interface consists of over 250 different function calls which can be used to draw complex three-dimensional scenes from simple primitives. OpenGL...

 for doing flexible off-screen rendering, including rendering to a texture. By capturing images that would normally be drawn to the screen, it can be used to implement a large variety of image filters, and post-processing effects. The FBO is analogous to the render targets model in DirectX
DirectX
Microsoft DirectX is a collection of application programming interfaces for handling tasks related to multimedia, especially game programming and video, on Microsoft platforms. Originally, the names of these APIs all began with Direct, such as Direct3D, DirectDraw, DirectMusic, DirectPlay,...

. It is used in OpenGL for its efficiency and ease of use. The use of FBOs doesn't suffer from the overhead associated with OpenGL drawing context switching, and has largely superseded the pbuffer and other methods involving context switches.

Uses

The FBO has two main uses: The post-processing of rendered images and composition between different scenes.
Some examples are:
  1. The rendered image is captured and subjected to Fragment Shaders or other manipulations. This allows for many of today's popular computer graphics effects to be carried out, including the addition of a blurring or bloom effect.
  2. Can be used to create views of other scenes, for example: a TV in a house. A scene can be rendered through an FBO to a texture, then that texture can be applied to the surface of a TV. This is sometimes called "Render to Texture" or RTT.

Advantages over other methods

Methods involving the FBO are considered superior because:
  • It is easier to set up than most other methods.
  • Does not require context switching.
  • Is more efficient because resources are shared within the same context.
  • Is more flexible because all of depth buffer, stencil buffer, etc can be acquired.

Architecture

To use an FBO one simply creates an instance of it. Along with the FBO come several attachments, one can then attach these to a chosen receiver; either a texture, or a render buffer.

For example:
  • Create an FBO.
  • Attach the color buffer to a texture.
  • Attach the depth buffer to a texture.
  • Render the texture to screen with a pixel shader, dependent on both the Color information and depth information.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK