#include <DxRenderTarget.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 | setColorInternalFormat (DXGI_FORMAT colorInternalFormat) |
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 | setDepthInternalFormat (DXGI_FORMAT 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 (D3D11_TEXTURE_ADDRESS_MODE wrapS, D3D11_TEXTURE_ADDRESS_MODE 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 (D3D11_TEXTURE_ADDRESS_MODE 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 (D3D11_TEXTURE_ADDRESS_MODE 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 | setFilter (D3D11_FILTER filter) |
Sets the minification filtering behavior for the FBO's textures. Default is GL_LINEAR: Possible values are. More... | |
DXGI_FORMAT | getColorInternalFormat () const |
Returns the texture target associated with the FBO. More... | |
DXGI_FORMAT | 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 | hasMipMapping () const |
Returns whether the contents of the FBO textures are mip-mapped. More... | |
Protected Attributes | |
DXGI_FORMAT | mColorInternalFormat |
DXGI_FORMAT | mDepthInternalFormat |
int | mSamples |
int | mCoverageSamples |
bool | mMipmapping |
bool | mDepthBuffer |
int | mNumColorBuffers |
D3D11_TEXTURE_ADDRESS_MODE | mWrapS |
D3D11_TEXTURE_ADDRESS_MODE | mWrapT |
D3D11_FILTER | mFilter |
Friends | |
class | RenderTarget |
cinder::dx::RenderTarget::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::dx::RenderTarget::Format::setColorInternalFormat | ( | DXGI_FORMAT | colorInternalFormat | ) |
Set the texture target associated with the FBO. Defaults to GL_TEXTURE_2D
, GL_TEXTURE_RECTANGLE_ARB
is a common option as well.
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::dx::RenderTarget::Format::setDepthInternalFormat | ( | DXGI_FORMAT | 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
.
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.
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::dx::RenderTarget::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::dx::RenderTarget::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::dx::RenderTarget::Format::enableMipmapping | ( | bool | enableMipmapping = true | ) |
Enables or disables mip-mapping for the FBO's textures.
void cinder::dx::RenderTarget::Format::setWrap | ( | D3D11_TEXTURE_ADDRESS_MODE | wrapS, |
D3D11_TEXTURE_ADDRESS_MODE | 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::dx::RenderTarget::Format::setWrapS | ( | D3D11_TEXTURE_ADDRESS_MODE | 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::dx::RenderTarget::Format::setWrapT | ( | D3D11_TEXTURE_ADDRESS_MODE | 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::dx::RenderTarget::Format::setFilter | ( | D3D11_FILTER | filter | ) |
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
DXGI_FORMAT cinder::dx::RenderTarget::Format::getColorInternalFormat | ( | ) | const |
Returns the texture target associated with the FBO.
Returns the GL internal format for the color buffer. Defaults to GL_RGBA8
.
DXGI_FORMAT cinder::dx::RenderTarget::Format::getDepthInternalFormat | ( | ) | const |
Returns the GL internal format for the depth buffer. Defaults to GL_DEPTH_COMPONENT24
.
int cinder::dx::RenderTarget::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::dx::RenderTarget::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::dx::RenderTarget::Format::hasColorBuffer | ( | ) | const |
Returns whether the FBO contains a color buffer.
int cinder::dx::RenderTarget::Format::getNumColorBuffers | ( | ) | const |
Returns the number of color buffers.
bool cinder::dx::RenderTarget::Format::hasDepthBuffer | ( | ) | const |
Returns whether the FBO contains a depth buffer.
bool cinder::dx::RenderTarget::Format::hasMipMapping | ( | ) | const |
Returns whether the contents of the FBO textures are mip-mapped.
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |