#include <Fbo.h>
Public Member Functions | |
Format () | |
Default constructor, sets the target to GL_TEXTURE_2D with an 8-bit color+alpha, a 24-bit depth texture, and no multisampling or mipmapping. | |
void | setTarget (GLenum target) |
Set the texture target associated with the FBO. Defaults to GL_TEXTURE_2D , GL_TEXTURE_RECTANGLE_ARB is a common option as well. | |
void | setColorInternalFormat (GLenum colorInternalFormat) |
Sets the GL internal format for the color buffer. Defaults to GL_RGBA8 . Common options also include GL_RGB8 and GL_RGBA32F . | |
void | setDepthInternalFormat (GLenum depthInternalFormat) |
Sets the GL internal format for the depth buffer. Defaults to GL_DEPTH_COMPONENT24 . Common options also include GL_DEPTH_COMPONENT16 and GL_DEPTH_COMPONENT32 . | |
void | setSamples (int samples) |
Sets the number of samples used in MSAA-style antialiasing. Defaults to none, disabling multisampling. Note that not all implementations support multisampling. | |
void | setCoverageSamples (int coverageSamples) |
Sets the number of coverage samples used in CSAA-style antialiasing. Defaults to none. Note that not all implementations support CSAA, and is currenlty Windows-only Nvidia. | |
void | enableColorBuffer (bool colorBuffer=true) |
Enables or disables the creation of a color buffer for the FBO. | |
void | enableDepthBuffer (bool depthBuffer=true) |
Enables or disables the creation of a depth buffer for the FBO. | |
void | enableMipmapping (bool enableMipmapping=true) |
Enables or disables mip-mapping for the FBO's textures. | |
void | setWrap (GLenum wrapS, GLenum wrapT) |
Sets the wrapping behavior for the FBO's textures. Possible values are GL_CLAMP , GL_REPEAT and GL_CLAMP_TO_EDGE . Default is GL_CLAMP_TO_EDGE . | |
void | setWrapS (GLenum wrapS) |
Sets the horizontal wrapping behavior for the FBO's textures. Default is GL_CLAMP_TO_EDGE . Possible values are GL_CLAMP , GL_REPEAT and GL_CLAMP_TO_EDGE . | |
void | setWrapT (GLenum wrapT) |
Sets the vertical wrapping behavior for the FBO's textures. Default is GL_CLAMP_TO_EDGE . Possible values are GL_CLAMP , GL_REPEAT and GL_CLAMP_TO_EDGE . | |
void | setMinFilter (GLenum minFilter) |
Sets the minification filtering behavior for the FBO's textures. Default is GL_LINEAR: Possible values are. | |
void | setMagFilter (GLenum magFilter) |
GLenum | getTarget () const |
Returns the texture target associated with the FBO. | |
GLenum | getColorInternalFormat () const |
Returns the GL internal format for the color buffer. Defaults to GL_RGBA8 . | |
GLenum | getDepthInternalFormat () const |
Returns the GL internal format for the depth buffer. Defaults to GL_DEPTH_COMPONENT24 . | |
int | getSamples () const |
Returns the number of samples used in MSAA-style antialiasing. Defaults to none, disabling multisampling. | |
int | getCoverageSamples () const |
Returns the number of coverage samples used in CSAA-style antialiasing. Defaults to none. | |
bool | hasColorBuffer () const |
Returns whether the FBO contains a color buffer. | |
bool | hasDepthBuffer () const |
Returns whether the FBO contains a depth buffer. | |
bool | hasMipMapping () const |
Returns whether the contents of the FBO textures are mip-mapped. | |
Protected Attributes | |
GLenum | mTarget |
GLenum | mColorInternalFormat |
GLenum | mDepthInternalFormat |
int | mSamples |
int | mCoverageSamples |
bool | mMipmapping |
bool | mColorBuffer |
bool | mDepthBuffer |
bool | mStencilBuffer |
GLenum | mWrapS |
GLenum | mWrapT |
GLenum | mMinFilter |
GLenum | mMagFilter |
Friends | |
class | Fbo |
cinder::gl::Fbo::Format::Format | ( | ) |
Default constructor, sets the target to GL_TEXTURE_2D
with an 8-bit color+alpha, a 24-bit depth texture, and no multisampling or mipmapping.
void cinder::gl::Fbo::Format::setTarget | ( | GLenum | target | ) |
Set the texture target associated with the FBO. Defaults to GL_TEXTURE_2D
, GL_TEXTURE_RECTANGLE_ARB
is a common option as well.
void cinder::gl::Fbo::Format::setColorInternalFormat | ( | GLenum | colorInternalFormat | ) |
Sets the GL internal format for the color buffer. Defaults to GL_RGBA8
. Common options also include GL_RGB8 and GL_RGBA32F
.
void cinder::gl::Fbo::Format::setDepthInternalFormat | ( | GLenum | depthInternalFormat | ) |
Sets the GL internal format for the depth buffer. Defaults to GL_DEPTH_COMPONENT24
. Common options also include GL_DEPTH_COMPONENT16 and GL_DEPTH_COMPONENT32
.
void cinder::gl::Fbo::Format::setSamples | ( | int | samples | ) |
Sets the number of samples used in MSAA-style antialiasing. Defaults to none, disabling multisampling. Note that not all implementations support multisampling.
void cinder::gl::Fbo::Format::setCoverageSamples | ( | int | coverageSamples | ) |
Sets the number of coverage samples used in CSAA-style antialiasing. Defaults to none. Note that not all implementations support CSAA, and is currenlty Windows-only Nvidia.
void cinder::gl::Fbo::Format::enableColorBuffer | ( | bool | colorBuffer = true |
) |
Enables or disables the creation of a color buffer for the FBO.
void cinder::gl::Fbo::Format::enableDepthBuffer | ( | bool | depthBuffer = true |
) |
Enables or disables the creation of a depth buffer for the FBO.
void cinder::gl::Fbo::Format::enableMipmapping | ( | bool | enableMipmapping = true |
) |
Enables or disables mip-mapping for the FBO's textures.
void cinder::gl::Fbo::Format::setWrap | ( | GLenum | wrapS, | |
GLenum | wrapT | |||
) |
Sets the wrapping behavior for the FBO's textures. Possible values are GL_CLAMP
, GL_REPEAT
and GL_CLAMP_TO_EDGE
. Default is GL_CLAMP_TO_EDGE
.
void cinder::gl::Fbo::Format::setWrapS | ( | GLenum | wrapS | ) |
Sets the horizontal wrapping behavior for the FBO's textures. Default is GL_CLAMP_TO_EDGE
. Possible values are GL_CLAMP
, GL_REPEAT
and GL_CLAMP_TO_EDGE
.
void cinder::gl::Fbo::Format::setWrapT | ( | GLenum | wrapT | ) |
Sets the vertical wrapping behavior for the FBO's textures. Default is GL_CLAMP_TO_EDGE
. Possible values are GL_CLAMP
, GL_REPEAT
and GL_CLAMP_TO_EDGE
.
void cinder::gl::Fbo::Format::setMinFilter | ( | GLenum | minFilter | ) |
Sets the minification filtering behavior for the FBO's textures. Default is GL_LINEAR:
Possible values are.
GL_NEAREST
GL_LINEAR
GL_NEAREST_MIPMAP_NEAREST
GL_LINEAR_MIPMAP_NEAREST
GL_NEAREST_MIPMAP_LINEAR
GL_LINEAR_MIPMAP_LINEAR
void cinder::gl::Fbo::Format::setMagFilter | ( | GLenum | magFilter | ) |
Sets the magnification filtering behavior for the FBO's textures. Default is GL_LINEAR:
Possible values are
GL_NEAREST
GL_LINEAR
GL_NEAREST_MIPMAP_NEAREST
GL_LINEAR_MIPMAP_NEAREST
GL_NEAREST_MIPMAP_LINEAR
GL_LINEAR_MIPMAP_LINEAR
GLenum cinder::gl::Fbo::Format::getTarget | ( | ) | const |
Returns the texture target associated with the FBO.
GLenum cinder::gl::Fbo::Format::getColorInternalFormat | ( | ) | const |
Returns the GL internal format for the color buffer. Defaults to GL_RGBA8
.
GLenum cinder::gl::Fbo::Format::getDepthInternalFormat | ( | ) | const |
Returns the GL internal format for the depth buffer. Defaults to GL_DEPTH_COMPONENT24
.
int cinder::gl::Fbo::Format::getSamples | ( | ) | const |
Returns the number of samples used in MSAA-style antialiasing. Defaults to none, disabling multisampling.
int cinder::gl::Fbo::Format::getCoverageSamples | ( | ) | const |
Returns the number of coverage samples used in CSAA-style antialiasing. Defaults to none.
bool cinder::gl::Fbo::Format::hasColorBuffer | ( | ) | const |
Returns whether the FBO contains a color buffer.
bool cinder::gl::Fbo::Format::hasDepthBuffer | ( | ) | const |
Returns whether the FBO contains a depth buffer.
bool cinder::gl::Fbo::Format::hasMipMapping | ( | ) | const |
Returns whether the contents of the FBO textures are mip-mapped.
friend class Fbo [friend] |
GLenum cinder::gl::Fbo::Format::mTarget [protected] |
GLenum cinder::gl::Fbo::Format::mColorInternalFormat [protected] |
GLenum cinder::gl::Fbo::Format::mDepthInternalFormat [protected] |
int cinder::gl::Fbo::Format::mSamples [protected] |
int cinder::gl::Fbo::Format::mCoverageSamples [protected] |
bool cinder::gl::Fbo::Format::mMipmapping [protected] |
bool cinder::gl::Fbo::Format::mColorBuffer [protected] |
bool cinder::gl::Fbo::Format::mDepthBuffer [protected] |
bool cinder::gl::Fbo::Format::mStencilBuffer [protected] |
GLenum cinder::gl::Fbo::Format::mWrapS [protected] |
GLenum cinder::gl::Fbo::Format::mWrapT [protected] |
GLenum cinder::gl::Fbo::Format::mMinFilter [protected] |
GLenum cinder::gl::Fbo::Format::mMagFilter [protected] |