![]() |
Cinder
0.9.1
|
#include <Fbo.h>
Inherited by cinder::gl::FboCubeMap::Format [private]
.
Public Member Functions | |
Format () | |
Format & | colorTexture (const Texture::Format &textureFormat=getDefaultColorTextureFormat(true)) |
Format & | disableColor () |
Format & | depthBuffer (GLenum internalFormat=getDefaultDepthInternalFormat()) |
Format & | depthTexture (const Texture::Format &textureFormat=getDefaultDepthTextureFormat()) |
Format & | disableDepth () |
Format & | samples (int samples) |
Format & | coverageSamples (int coverageSamples) |
Format & | stencilBuffer (bool stencilBuffer=true) |
Format & | attachment (GLenum attachmentPoint, const RenderbufferRef &buffer, RenderbufferRef multisampleBuffer=RenderbufferRef()) |
Format & | attachment (GLenum attachmentPoint, const TextureBaseRef &texture, RenderbufferRef multisampleBuffer=RenderbufferRef()) |
void | setDepthBufferInternalFormat (GLint depthInternalFormat) |
void | setSamples (int samples) |
void | setCoverageSamples (int coverageSamples) |
void | setColorTextureFormat (const Texture::Format &format) |
void | enableDepthBuffer (bool depthBuffer=true) |
void | enableStencilBuffer (bool stencilBuffer=true) |
void | removeAttachment (GLenum attachmentPoint) |
GLint | getDepthBufferInternalFormat () const |
const Texture::Format & | getColorTextureFormat () const |
const Texture::Format & | getDepthTextureFormat () const |
int | getSamples () const |
int | getCoverageSamples () const |
bool | hasColorTexture () const |
bool | hasDepthBuffer () const |
bool | hasStencilBuffer () const |
const std::string & | getLabel () const |
void | setLabel (const std::string &label) |
Format & | label (const std::string &label) |
Static Public Member Functions | |
static Texture::Format | getDefaultColorTextureFormat (bool alpha=true) |
static Texture::Format | getDefaultDepthTextureFormat () |
static GLint | getDefaultColorInternalFormat (bool alpha=true) |
static GLint | getDefaultDepthInternalFormat () |
static void | getDepthStencilFormats (GLint depthInternalFormat, GLint *resultInternalFormat, GLenum *resultPixelDataType) |
Protected Attributes | |
GLenum | mDepthBufferInternalFormat |
int | mSamples |
int | mCoverageSamples |
bool | mColorTexture |
bool | mDepthTexture |
bool | mDepthBuffer |
bool | mStencilBuffer |
Texture::Format | mColorTextureFormat |
Texture::Format | mDepthTextureFormat |
std::string | mLabel |
std::map< GLenum, RenderbufferRef > | mAttachmentsBuffer |
std::map< GLenum, RenderbufferRef > | mAttachmentsMultisampleBuffer |
std::map< GLenum, TextureBaseRef > | mAttachmentsTexture |
Friends | |
class | Fbo |
Defines the Format of the Fbo, which is passed in via create().
The default provides an 8-bit RGBA color texture attachment and a 24-bit depth renderbuffer attachment, multi-sampling and stencil disabled.
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.
Format& cinder::gl::Fbo::Format::colorTexture | ( | const Texture::Format & | textureFormat = getDefaultColorTextureFormat( true ) | ) |
Enables a color texture at GL_COLOR_ATTACHMENT0
with a Texture::Format of textureFormat, which defaults to 8-bit RGBA with no mipmapping. Disables a color renderbuffer.
Format& cinder::gl::Fbo::Format::depthBuffer | ( | GLenum | internalFormat = getDefaultDepthInternalFormat() | ) |
Enables a depth renderbuffer with an internal format of internalFormat, which defaults to GL_DEPTH_COMPONENT24
. Disables a depth texture.
Format& cinder::gl::Fbo::Format::depthTexture | ( | const Texture::Format & | textureFormat = getDefaultDepthTextureFormat() | ) |
Enables a depth texture with a format of textureFormat, which defaults to GL_DEPTH_COMPONENT24
. Disables a depth renderbuffer.
Format& cinder::gl::Fbo::Format::samples | ( | int | samples | ) |
Sets the number of MSAA samples. Defaults to none.
Format& cinder::gl::Fbo::Format::coverageSamples | ( | int | coverageSamples | ) |
Sets the number of CSAA samples. Defaults to none.
Format& cinder::gl::Fbo::Format::stencilBuffer | ( | bool | stencilBuffer = true | ) |
Enables a stencil buffer. Defaults to false.
Fbo::Format & cinder::gl::Fbo::Format::attachment | ( | GLenum | attachmentPoint, |
const RenderbufferRef & | buffer, | ||
RenderbufferRef | multisampleBuffer = RenderbufferRef() |
||
) |
Adds a Renderbuffer attachment buffer at attachmentPoint (such as GL_COLOR_ATTACHMENT0
). Replaces any existing attachment at the same attachment point.
Fbo::Format & cinder::gl::Fbo::Format::attachment | ( | GLenum | attachmentPoint, |
const TextureBaseRef & | texture, | ||
RenderbufferRef | multisampleBuffer = RenderbufferRef() |
||
) |
Adds a Texture attachment texture at attachmentPoint (such as GL_COLOR_ATTACHMENT0
). Replaces any existing attachment at the same attachment point.
void cinder::gl::Fbo::Format::setDepthBufferInternalFormat | ( | GLint | depthInternalFormat | ) |
Sets the 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. Ignored on OpenGL ES.
void cinder::gl::Fbo::Format::setColorTextureFormat | ( | const Texture::Format & | format | ) |
Sets the Color Texture::Format for use in the creation of the color texture.
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::enableStencilBuffer | ( | bool | stencilBuffer = true | ) |
Enables or disables the creation of a stencil buffer.
void cinder::gl::Fbo::Format::removeAttachment | ( | GLenum | attachmentPoint | ) |
Removes a buffer or texture attached at attachmentPoint.
GLint cinder::gl::Fbo::Format::getDepthBufferInternalFormat | ( | ) | const |
Returns the GL internal format for the depth buffer. Defaults to GL_DEPTH_COMPONENT24
.
const Texture::Format& cinder::gl::Fbo::Format::getColorTextureFormat | ( | ) | const |
Returns the Texture::Format for the default color texture at GL_COLOR_ATTACHMENT0.
const Texture::Format& cinder::gl::Fbo::Format::getDepthTextureFormat | ( | ) | const |
Returns the Texture::Format for the depth texture.
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. MSW only.
bool cinder::gl::Fbo::Format::hasColorTexture | ( | ) | const |
Returns whether the FBO contains a Texture at GL_COLOR_ATTACHMENT0.
bool cinder::gl::Fbo::Format::hasDepthBuffer | ( | ) | const |
Returns whether the FBO has a Renderbuffer as a depth attachment.
bool cinder::gl::Fbo::Format::hasStencilBuffer | ( | ) | const |
Returns whether the FBO has a Renderbuffer as a stencil attachment.
|
static |
Returns the default color Texture::Format for this platform.
|
static |
Returns the default depth Texture::Format for this platform.
|
static |
Returns the default internalFormat for a color Renderbuffer for this platform.
|
static |
Returns the default internalFormat for a depth Renderbuffer for this platform.
|
static |
const std::string& cinder::gl::Fbo::Format::getLabel | ( | ) | const |
Returns the debugging label associated with the Fbo.
void cinder::gl::Fbo::Format::setLabel | ( | const std::string & | label | ) |
Sets the debugging label associated with the Fbo. Calls glObjectLabel() when available.
Format& cinder::gl::Fbo::Format::label | ( | const std::string & | label | ) |
Sets the debugging label associated with the Fbo. Calls glObjectLabel() when available.
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |