class ffw::GLFramebuffer

Class List > ffw :: GLFramebuffer

Classes

Type Name
class Attachment

Public Static Attributes

Type Name
static const std::initializer_list< Attachment > NO_ATTACHMENTS

Public Functions

Type Name
GLFramebuffer (const std::initializer_list< Attachment > & attachments)
Constructs a framebuffer object using a list of attachments.
GLFramebuffer (Iterator begin, Iterator end)
GLFramebuffer ()
GLFramebuffer (const GLFramebuffer & other) = delete
GLFramebuffer (GLFramebuffer && other)
void swap (GLFramebuffer & other)
~GLFramebuffer ()
bool isCreated () const
Returns true if the framebuffer object has been created.
void addTexture (GLenum attachment, GLuint textype, GLuint texture, GLint level = 0) const
Attach a texture image to the framebuffer object.
void addRenderbuffer (GLenum attachment, GLuint texture) const
Attach a renderbuffer object to a framebuffer object.
void addStencilTexture (const ffw::GLTexture2D * texture, const GLint level = 0)
Attach a stencil texture to the framebuffer object.
void addStencilBuffer (const ffw::GLRenderbuffer2D * texture)
Attach a stencil renderbuffer to the framebuffer object.
void addColorTexture (const ffw::GLTexture2D * texture, const GLint level = 0)
Attach a color texture to the framebuffer object.
void addCubemapTexture (const ffw::GLTextureCubemap * texture, const GLint side, const GLint level = 0)
Attach a color cubemap texture to the framebuffer object.
void addDepthTexture (const ffw::GLTexture2D * texture, const GLint level = 0)
Attach a depth texture to the framebuffer object.
void addColorTextureMS (const ffw::GLTexture2DMS * texture, const GLint level = 0)
Attach a color multisample texture to the framebuffer object.
void addDepthTextureMS (const ffw::GLTexture2DMS * texture, const GLint level = 0)
Attach a depth multisample texture to the framebuffer object.
void addColorRenderbuffer (const ffw::GLRenderbuffer2D * texture)
Attach a color renderbuffer to the framebuffer object.
void addDepthRenderbuffer (const ffw::GLRenderbuffer2D * texture)
Attach a depth renderbuffer to the framebuffer object.
void addColorRenderbufferMS (const ffw::GLRenderbuffer2DMS * texture)
Attach a color multisample renderbuffer to the framebuffer object.
void addDepthRenderbufferMS (const ffw::GLRenderbuffer2DMS * texture)
Attach a depth multisample renderbuffer to the framebuffer object.
bool checkStatus ()
Check the completeness status of a framebuffer.
unsigned int getHandle () const
Returns the named object of the framebuffer (the handle)
void resetColorCount ()
Resets the color count of the color attachments.
bool destroy ()
Destroys the framebuffer object.
void bind () const
Binds the framebuffer object as GL_FRAMEBUFFER.
void unbind () const
Unbinds the framebuffer object by setting the current GL_FRAMEBUFFER to zero.
GLFramebuffer & operator= (const GLFramebuffer & other) = delete
GLFramebuffer & operator= (GLFramebuffer && other)

Public Static Attributes Documentation

variable NO_ATTACHMENTS

const std::initializer_list<Attachment> ffw::GLFramebuffer::NO_ATTACHMENTS;

Public Functions Documentation

function GLFramebuffer (1/5)

ffw::GLFramebuffer::GLFramebuffer (
    const std::initializer_list< Attachment > & attachments
)

Constructs a framebuffer object using a list of attachments.

function GLFramebuffer (2/5)

ffw::GLFramebuffer::GLFramebuffer (
    Iterator begin,
    Iterator end
)

function GLFramebuffer (3/5)

ffw::GLFramebuffer::GLFramebuffer ()

function GLFramebuffer (4/5)

ffw::GLFramebuffer::GLFramebuffer (
    const GLFramebuffer & other
) = delete

function GLFramebuffer (5/5)

ffw::GLFramebuffer::GLFramebuffer (
    GLFramebuffer && other
)

function swap

void ffw::GLFramebuffer::swap (
    GLFramebuffer & other
)

function ~GLFramebuffer

ffw::GLFramebuffer::~GLFramebuffer ()

function isCreated

bool ffw::GLFramebuffer::isCreated () const

Returns true if the framebuffer object has been created.

function addTexture

void ffw::GLFramebuffer::addTexture (
    GLenum attachment,
    GLuint textype,
    GLuint texture,
    GLint level = 0
) const

Attach a texture image to the framebuffer object.

Parameters:

  • attachment Specifies the attachment point to which an image from texture should be attached. Must be one of the GL_COLOR_ATTACHMENT0, GL_DEPTH_ATTACHMENT, or GL_STENCIL_ATTACHMENT.
  • textype Specifies the texture target. Must be one of the GL_TEXTURE_2D, GL_TEXTURE_CUBE_MAP_POSITIVE_X, GL_TEXTURE_CUBE_MAP_NEGATIVE_X, GL_TEXTURE_CUBE_MAP_POSITIVE_Y, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, GL_TEXTURE_CUBE_MAP_POSITIVE_Z, or GL_TEXTURE_CUBE_MAP_NEGATIVE_Z.
  • texture Specifies the texture object whose image is to be attached. (the handle returned by ffw::Texture::getHandle())
  • level Specifies the mipmap level of the texture image to be attached, which must be 0.

See also: ffw::Texture::getHandle

function addRenderbuffer

void ffw::GLFramebuffer::addRenderbuffer (
    GLenum attachment,
    GLuint texture
) const

Attach a renderbuffer object to a framebuffer object.

Parameters:

  • attachment Specifies the attachment point to which renderbuffer should be attached. Must be one of the GL_COLOR_ATTACHMENT0, GL_DEPTH_ATTACHMENT, or GL_STENCIL_ATTACHMENT.
  • texture Specifies the renderbuffer object that is to be attached. (the handle returned by ffw::Renderbuffer::getHandle())

See also: ffw::Renderbuffer::getHandle

function addStencilTexture

void ffw::GLFramebuffer::addStencilTexture (
    const ffw::GLTexture2D * texture,
    const GLint level = 0
)

Attach a stencil texture to the framebuffer object.

Parameters:

  • texture The texture that is to be attached.
  • level The mipmap level, must be 0.

function addStencilBuffer

void ffw::GLFramebuffer::addStencilBuffer (
    const ffw::GLRenderbuffer2D * texture
)

Attach a stencil renderbuffer to the framebuffer object.

Parameters:

  • texture The renderbuffer that is to be attached.
  • level The mipmap level, must be 0.

function addColorTexture

void ffw::GLFramebuffer::addColorTexture (
    const ffw::GLTexture2D * texture,
    const GLint level = 0
)

Attach a color texture to the framebuffer object.

Parameters:

  • texture The texture that is to be attached.
  • level The mipmap level, must be 0.

function addCubemapTexture

void ffw::GLFramebuffer::addCubemapTexture (
    const ffw::GLTextureCubemap * texture,
    const GLint side,
    const GLint level = 0
)

Attach a color cubemap texture to the framebuffer object.

Parameters:

  • texture The texture that is to be attached.
  • side The size of the cubemap to attach where 0 is positive X side followed by X negative (1), Y positive (2), Y negative (3), Z positive (4), Z negative (5).
  • level The mipmap level, must be 0.

function addDepthTexture

void ffw::GLFramebuffer::addDepthTexture (
    const ffw::GLTexture2D * texture,
    const GLint level = 0
)

Attach a depth texture to the framebuffer object.

Parameters:

  • texture The texture that is to be attached.
  • level The mipmap level, must be 0.

function addColorTextureMS

void ffw::GLFramebuffer::addColorTextureMS (
    const ffw::GLTexture2DMS * texture,
    const GLint level = 0
)

Attach a color multisample texture to the framebuffer object.

Parameters:

  • texture The texture that is to be attached.
  • level The mipmap level, must be 0.

function addDepthTextureMS

void ffw::GLFramebuffer::addDepthTextureMS (
    const ffw::GLTexture2DMS * texture,
    const GLint level = 0
)

Attach a depth multisample texture to the framebuffer object.

Parameters:

  • texture The texture that is to be attached.
  • level The mipmap level, must be 0.

function addColorRenderbuffer

void ffw::GLFramebuffer::addColorRenderbuffer (
    const ffw::GLRenderbuffer2D * texture
)

Attach a color renderbuffer to the framebuffer object.

Parameters:

  • texture The renderbuffer that is to be attached.

function addDepthRenderbuffer

void ffw::GLFramebuffer::addDepthRenderbuffer (
    const ffw::GLRenderbuffer2D * texture
)

Attach a depth renderbuffer to the framebuffer object.

Parameters:

  • texture The renderbuffer that is to be attached.

function addColorRenderbufferMS

void ffw::GLFramebuffer::addColorRenderbufferMS (
    const ffw::GLRenderbuffer2DMS * texture
)

Attach a color multisample renderbuffer to the framebuffer object.

Parameters:

  • texture The renderbuffer that is to be attached.

function addDepthRenderbufferMS

void ffw::GLFramebuffer::addDepthRenderbufferMS (
    const ffw::GLRenderbuffer2DMS * texture
)

Attach a depth multisample renderbuffer to the framebuffer object.

Parameters:

  • texture The renderbuffer that is to be attached.

function checkStatus

bool ffw::GLFramebuffer::checkStatus ()

Check the completeness status of a framebuffer.

function getHandle

unsigned int ffw::GLFramebuffer::getHandle () const

Returns the named object of the framebuffer (the handle)

function resetColorCount

void ffw::GLFramebuffer::resetColorCount ()

Resets the color count of the color attachments.

function destroy

bool ffw::GLFramebuffer::destroy ()

Destroys the framebuffer object.

function bind

void ffw::GLFramebuffer::bind () const

Binds the framebuffer object as GL_FRAMEBUFFER.

function unbind

void ffw::GLFramebuffer::unbind () const

Unbinds the framebuffer object by setting the current GL_FRAMEBUFFER to zero.

function operator= (1/2)

GLFramebuffer & ffw::GLFramebuffer::operator= (
    const GLFramebuffer & other
) = delete

function operator= (2/2)

GLFramebuffer & ffw::GLFramebuffer::operator= (
    GLFramebuffer && other
)

The documentation for this class was generated from the following file: include/ffw/graphics/glframebuffer.h