Represents an OpenGL Framebuffer Object.

FBOs are used for doing off-screen rendering, including rendering to a texture. An FBO can capture draw commands that would normally go to the screen, and can be used to implement a large variety of techniques, particularly post-processing effects like blurs, depth-of-field and the like.

FBOs are formally specified in the extension GL_EXT_framebuffer_object.


Public Member Functions

  • ~Fbo ()

Static Public Member Functions


Protected Member Functions

  • Fbo (int width, int height, const Format &format)
  • void
    init ()
  • void
    initMultisamplingSettings (bool *useMsaa, bool *useCsaa, Format *format)
  • void
    prepareAttachments (const Format &format, bool multisampling)
  • void
    attachAttachments ()
  • void
    initMultisample (const Format &format)
  • void
    updateMipmaps (GLenum attachment) const
  • bool
    checkStatus (class FboExceptionInvalidSpecification *resultExc)
  • void
    setDrawBuffers (GLuint fbId, const std::map< GLenum, RenderbufferRef > &attachmentsBuffer, const std::map< GLenum, TextureBaseRef > &attachmentsTexture)

Protected Attributes

  • int
    mWidth
  • int
    mHeight
  • mFormat
  • GLuint
    mId
  • GLuint
    mMultisampleFramebufferId
  • std::map< GLenum, RenderbufferRef >
    mAttachmentsBuffer
  • std::map< GLenum, RenderbufferRef >
    mAttachmentsMultisampleBuffer
  • std::map< GLenum, TextureBaseRef >
    mAttachmentsTexture
  • std::string
    mLabel
  • bool
    mNeedsResolve
  • bool
    mNeedsMipmapUpdate

Friends

  • friend CI_API std::ostream &
    operator<< (std::ostream &os, const Fbo &rhs)