Cinder  0.8.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Member Functions | Protected Attributes | Friends | List of all members
cinder::gl::Fbo::Format Struct Reference

#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. More...
 
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. More...
 
void setColorInternalFormat (GLenum colorInternalFormat)
 Sets the GL internal format for the color buffer. Defaults to GL_RGBA8 (and GL_RGBA on OpenGL ES). Common options also include GL_RGB8 and GL_RGBA32F. More...
 
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. More...
 
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. Ignored on OpenGL ES. More...
 
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. Ignored on OpenGL ES. More...
 
void enableColorBuffer (bool colorBuffer=true, int numColorBuffers=1)
 Enables or disables the creation of a color buffer for the FBO.. Creates multiple color attachments when numColorsBuffers >1, except on OpenGL ES which supports only 1. More...
 
void enableDepthBuffer (bool depthBuffer=true, bool asTexture=true)
 Enables or disables the creation of a depth buffer for the FBO. If asTexture the depth buffer is created as a gl::Texture, obtainable via getDepthTexture(). Not supported on OpenGL ES. More...
 
void enableMipmapping (bool enableMipmapping=true)
 Enables or disables mip-mapping for the FBO's textures. More...
 
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. More...
 
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. More...
 
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. More...
 
void setMinFilter (GLenum minFilter)
 Sets the minification filtering behavior for the FBO's textures. Default is GL_LINEAR: Possible values are. More...
 
void setMagFilter (GLenum magFilter)
 
GLenum getTarget () const
 Returns the texture target associated with the FBO. More...
 
GLenum getColorInternalFormat () const
 Returns the GL internal format for the color buffer. Defaults to GL_RGBA8. More...
 
GLenum getDepthInternalFormat () const
 Returns the GL internal format for the depth buffer. Defaults to GL_DEPTH_COMPONENT24. More...
 
int getSamples () const
 Returns the number of samples used in MSAA-style antialiasing. Defaults to none, disabling multisampling. OpenGL ES does not support multisampling. More...
 
int getCoverageSamples () const
 Returns the number of coverage samples used in CSAA-style antialiasing. Defaults to none. OpenGL ES does not support multisampling. More...
 
bool hasColorBuffer () const
 Returns whether the FBO contains a color buffer. More...
 
int getNumColorBuffers () const
 Returns the number of color buffers. More...
 
bool hasDepthBuffer () const
 Returns whether the FBO contains a depth buffer. More...
 
bool hasDepthBufferTexture () const
 Returns whether the FBO contains a depth buffer implemened as a texture. Always false on OpenGL ES. More...
 
bool hasMipMapping () const
 Returns whether the contents of the FBO textures are mip-mapped. More...
 

Protected Attributes

GLenum mTarget
 
GLenum mColorInternalFormat
 
GLenum mDepthInternalFormat
 
int mSamples
 
int mCoverageSamples
 
bool mMipmapping
 
bool mDepthBuffer
 
bool mDepthBufferAsTexture
 
bool mStencilBuffer
 
int mNumColorBuffers
 
GLenum mWrapS
 
GLenum mWrapT
 
GLenum mMinFilter
 
GLenum mMagFilter
 

Friends

class Fbo
 

Constructor & Destructor Documentation

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.

Member Function Documentation

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 (and GL_RGBA on OpenGL ES). 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. Ignored on OpenGL ES.

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. Ignored on OpenGL ES.

void cinder::gl::Fbo::Format::enableColorBuffer ( bool  colorBuffer = true,
int  numColorBuffers = 1 
)

Enables or disables the creation of a color buffer for the FBO.. Creates multiple color attachments when numColorsBuffers >1, except on OpenGL ES which supports only 1.

void cinder::gl::Fbo::Format::enableDepthBuffer ( bool  depthBuffer = true,
bool  asTexture = true 
)

Enables or disables the creation of a depth buffer for the FBO. If asTexture the depth buffer is created as a gl::Texture, obtainable via getDepthTexture(). Not supported on OpenGL ES.

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. OpenGL ES does not support multisampling.

int cinder::gl::Fbo::Format::getCoverageSamples ( ) const

Returns the number of coverage samples used in CSAA-style antialiasing. Defaults to none. OpenGL ES does not support multisampling.

bool cinder::gl::Fbo::Format::hasColorBuffer ( ) const

Returns whether the FBO contains a color buffer.

int cinder::gl::Fbo::Format::getNumColorBuffers ( ) const

Returns the number of color buffers.

bool cinder::gl::Fbo::Format::hasDepthBuffer ( ) const

Returns whether the FBO contains a depth buffer.

bool cinder::gl::Fbo::Format::hasDepthBufferTexture ( ) const

Returns whether the FBO contains a depth buffer implemened as a texture. Always false on OpenGL ES.

bool cinder::gl::Fbo::Format::hasMipMapping ( ) const

Returns whether the contents of the FBO textures are mip-mapped.

Friends And Related Function Documentation

friend class Fbo
friend

Member Data Documentation

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::mDepthBuffer
protected
bool cinder::gl::Fbo::Format::mDepthBufferAsTexture
protected
bool cinder::gl::Fbo::Format::mStencilBuffer
protected
int cinder::gl::Fbo::Format::mNumColorBuffers
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

The documentation for this struct was generated from the following files: