Basic Image AlgorithmS Library
2.8.0
|
Class containing a framebuffer and a map of setups. More...
#include <OpenGLFramework/Utils/FramebufferSetupPool.hh>
Public Member Functions | |
void | Activate (const std::string &setupName) |
void | ClearAll () |
void | ClearSetup (const std::string &setupName) |
Does not remove the attachment. More... | |
void | Create (Texture2DPool &texturePoolP) |
Call this once the GLContext is valid. More... | |
FramebufferSetup * | CreateSetup (const std::string &setupName) |
FramebufferSetup * | CreateSetup (const std::string &setupName, unsigned int width, unsigned int height, const std::string &colorAttachmentName, GLenum internalFormat, const bool clearColors=true, const std::string &depthAttachmentName="", const bool clearDepth=true, const float rClear=0.f, const float gClear=0.f, const float bClear=0.f, const float aClear=0.f, const float zClear=1.f) |
Create a setup and the required 2D textures. More... | |
FramebufferSetup * | CreateSetup (const std::string &setupName, unsigned int width, unsigned int height, const std::vector< std::string > &colorAttachmentNames, GLenum internalFormat, const bool clearColors=true, const std::string &depthAttachmentName="", const bool clearDepth=true, const float rClear=0.f, const float gClear=0.f, const float bClear=0.f, const float aClear=0.f, const float zClear=1.f) |
FramebufferSetupPool () | |
glfTexture2D * | GetAttachment (const std::string &setupName, const std::string &attachmentName) |
Returns the pointer to a texture attached during a setup. More... | |
glfFramebufferObject * | GetFBO () |
FramebufferSetup * | GetSetup (const std::string &setupName) |
Returns the pointer to a texture attached during a setup. More... | |
void | GetSetupAttachmentNames (const std::string &setupName, std::vector< std::string > &attachmentNames) |
Texture2DPool * | GetTexturePool () |
void | SetColorAttachments (const std::string &setupName, const std::vector< std::string > &colorAttachmentNames) |
~FramebufferSetupPool () | |
Class containing a framebuffer and a map of setups.
Class can be used instead of an stand alone glfFramebufferObject, to manage different frambuffer setups. This class so far only supports 2D textures.
Definition at line 45 of file FramebufferSetupPool.hh.
FramebufferSetupPool::~FramebufferSetupPool | ( | ) |
Definition at line 31 of file FramebufferSetupPool.cpp.
|
inline |
Definition at line 49 of file FramebufferSetupPool.hh.
void FramebufferSetupPool::Activate | ( | const std::string & | setupName | ) |
Definition at line 285 of file FramebufferSetupPool.cpp.
Referenced by BIAS::SimpleMultiPassFragmentShader::Execute().
void FramebufferSetupPool::ClearAll | ( | ) |
Definition at line 260 of file FramebufferSetupPool.cpp.
void FramebufferSetupPool::ClearSetup | ( | const std::string & | setupName | ) |
Does not remove the attachment.
Definition at line 273 of file FramebufferSetupPool.cpp.
void FramebufferSetupPool::Create | ( | Texture2DPool & | texturePoolP | ) |
Call this once the GLContext is valid.
Definition at line 37 of file FramebufferSetupPool.cpp.
References BIAS::Texture2DPool::Create().
FramebufferSetup * FramebufferSetupPool::CreateSetup | ( | const std::string & | setupName | ) |
Definition at line 237 of file FramebufferSetupPool.cpp.
References BIAS::FramebufferSetup::LinkFBO().
FramebufferSetup * FramebufferSetupPool::CreateSetup | ( | const std::string & | setupName, |
unsigned int | width, | ||
unsigned int | height, | ||
const std::string & | colorAttachmentName, | ||
GLenum | internalFormat, | ||
const bool | clearColors = true , |
||
const std::string & | depthAttachmentName = "" , |
||
const bool | clearDepth = true , |
||
const float | rClear = 0.f , |
||
const float | gClear = 0.f , |
||
const float | bClear = 0.f , |
||
const float | aClear = 0.f , |
||
const float | zClear = 1.f |
||
) |
Create a setup and the required 2D textures.
setupName | is the name used to identify the setup. |
width | horizontal resolution. |
width | vertical resolution. |
colorAttachmentName | name of the glfTexture2D attached to COLOR_ATTACHMENT_0, identifying it in the internal Texture2DPool, this name must be unique across all setups. |
internalFormat | is the internal format of the target glfTexture2D. |
clearColor | if true the target texture is cleared when the setup is activated. |
depthAttachmentName | if you want to render the depth output to a texture, give it a name for the internal Texture2DPool, if left empty to texture for the depth is attached, this name must be unique across all setups. |
clearDepth | if true the target 'depth textur'e is cleared when the setup is activated. |
*Clear | values the different channels are cleared, if clearing is enabled. |
Definition at line 57 of file FramebufferSetupPool.cpp.
References BIAS::glfTexture::Create(), BIAS::FramebufferSetup::DisableColorClearance(), BIAS::FramebufferSetup::DisableDepthClearance(), BIAS::FramebufferSetup::EnableColorClearance(), BIAS::FramebufferSetup::EnableDepthClearance(), BIAS::FramebufferSetup::LinkFBO(), BIAS::FramebufferSetup::SetColorAttachment(), and BIAS::FramebufferSetup::SetDepthAttachment().
FramebufferSetup * FramebufferSetupPool::CreateSetup | ( | const std::string & | setupName, |
unsigned int | width, | ||
unsigned int | height, | ||
const std::vector< std::string > & | colorAttachmentNames, | ||
GLenum | internalFormat, | ||
const bool | clearColors = true , |
||
const std::string & | depthAttachmentName = "" , |
||
const bool | clearDepth = true , |
||
const float | rClear = 0.f , |
||
const float | gClear = 0.f , |
||
const float | bClear = 0.f , |
||
const float | aClear = 0.f , |
||
const float | zClear = 1.f |
||
) |
Definition at line 122 of file FramebufferSetupPool.cpp.
References BIAS::glfTexture::Create(), BIAS::FramebufferSetup::DisableColorClearance(), BIAS::FramebufferSetup::DisableDepthClearance(), BIAS::FramebufferSetup::EnableColorClearance(), BIAS::FramebufferSetup::EnableDepthClearance(), BIAS::FramebufferSetup::LinkFBO(), BIAS::FramebufferSetup::SetColorAttachment(), and BIAS::FramebufferSetup::SetDepthAttachment().
glfTexture2D * FramebufferSetupPool::GetAttachment | ( | const std::string & | setupName, |
const std::string & | attachmentName | ||
) |
Returns the pointer to a texture attached during a setup.
Definition at line 333 of file FramebufferSetupPool.cpp.
glfFramebufferObject * FramebufferSetupPool::GetFBO | ( | ) |
Definition at line 321 of file FramebufferSetupPool.cpp.
Referenced by BIAS::SimpleMultiPassFragmentShader::Execute().
FramebufferSetup * FramebufferSetupPool::GetSetup | ( | const std::string & | setupName | ) |
Returns the pointer to a texture attached during a setup.
Definition at line 305 of file FramebufferSetupPool.cpp.
Referenced by BIAS::SimpleMultiPassFragmentShader::DisableColorClearance(), BIAS::SimpleMultiPassFragmentShader::DisableDepthClearance(), BIAS::SimpleMultiPassFragmentShader::EnableColorClearance(), BIAS::SimpleMultiPassFragmentShader::EnableDepthClearance(), and BIAS::SimpleMultiPassFragmentShader::Execute().
void FramebufferSetupPool::GetSetupAttachmentNames | ( | const std::string & | setupName, |
std::vector< std::string > & | attachmentNames | ||
) |
Definition at line 359 of file FramebufferSetupPool.cpp.
Texture2DPool * FramebufferSetupPool::GetTexturePool | ( | ) |
Definition at line 327 of file FramebufferSetupPool.cpp.
void FramebufferSetupPool::SetColorAttachments | ( | const std::string & | setupName, |
const std::vector< std::string > & | colorAttachmentNames | ||
) |
Definition at line 184 of file FramebufferSetupPool.cpp.