The framebuffer object (FBO) is an extension to OpenGL for flexibly rendering to off-screen buffers, including rendering to a texture buffer. It can be used to implement a large variety of image filters and post-processing effects, by rendering images to the off-screen buffer first, applying the effects, before sending them to the on-screen buffer.

The FBO 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 that use context switching.

The FBO is analogous to the render targets model in DirectX.

Uses

edit

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 showing the view from a secondary camera. 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

edit

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

edit

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. An FBO can expose multiple color attachment points (GL_COLOR_ATTACHMENT0 and up), and applications normally check that the chosen set of attachments is framebuffer-complete before rendering to it.[1]

For example:

  • Create an FBO and bind it.
  • Attach the color buffer (either as a RenderBuffer or a texture) to the FBO.
  • Attach the depth buffer (either as a RenderBuffer or a texture) to the FBO.
  • Bind the native window FrameBuffer (id=0)
  • Render the texture to screen with a pixel shader, dependent on both the Color information and depth information.

References

edit
  1. ^ "OpenGL 4.5 Core Profile Specification" (PDF). Khronos Group.
edit

📚 Artikel Terkait di Wikipedia

X video extension

accelerate video playback during the drawing of windows using an OpenGL Framebuffer Object or pbuffer. Metacity, an X window manager uses compositing in this

Pixel buffer

Pixel buffer objects (also named PBOs), which are non-renderable buffers containing raw pixel data. Framebuffer Object Pixel buffer objects WGL_EXT_pbuffer

FBO

Foxtel Box Office, an Australian pay-per-view television channel Framebuffer object, an architectural element of OpenGL image processing Office of Foreign

OpenGL ES

the original on 31 December 2024. "stack overflow: glGenFramebuffersOES vs glGenFramebuffers?". Retrieved 2022-04-19. "Khronos Press Releases - OpenGL

Visualization Library

texture formats such as multisample textures and texture objects, extensive framebuffer object support and a better tuning for applications that make heavy

BrookGPU

v0.5 include a much upgraded and faster OpenGL backend which uses framebuffer objects instead of PBuffers and harmonised the code around standard OpenGL

OpenSceneGraph

effects Support for anti-aliased TrueType text Seamless support for framebuffer objects, pbuffers and frame buffer render-to-texture effects Multi-threaded

Windows Vista

Vista. ATI and NVIDIA strongly recommend using compositing desktop/Framebuffer Objects for same functionality. Windows Vista is the first Microsoft operating