Basic Image AlgorithmS Library
2.8.0
|
Class rendering quad and executing a fragment shader. More...
#include <OpenGLFramework/SpecializedBatches/PlainPerPixelProcessing.hh>
Public Member Functions | |
void | Execute () |
glfDepthBufferMode & | GetDepthBufferMode () |
PlainPerPixelProcessing (bool flip=false) | |
void | ReleaseTextures () |
void | SetFlip (bool flip=true) |
void | SetFragmentShaderFromFile (const std::string &fileName) |
void | SetFragmentShaderFromString (const std::string &source) |
void | SetOutputSize (unsigned int width, unsigned int height) |
Returns the currently set texture set;. More... | |
void | SetRenderTarget (BIAS::glfRenderTarget *rt) |
void | SetSamplerNames (const std::vector< std::string > &samplerNames) |
void | SetTexture (BIAS::glfTexture2D *inputTexture) |
void | SetTextures (const std::vector< BIAS::glfTexture2D * > &inputTextures) |
Adds textures in their respective index order and assigns them the default names img<index> in the shader programm. More... | |
void | SetTextures (std::list< BIAS::glfTexture2D * > &inputTextures) |
void | SetUniform (const std::string &name, float val) |
void | SetUniform (const std::string &name, int val) |
Protected Member Functions | |
void | Init_ () |
void | InitBatch_ () |
void | InitPrimitiveData_ () |
void | InitShaders_ () |
void | InitVertexTransformation_ () |
PlainPerPixelProcessing & | operator= (const PlainPerPixelProcessing &) |
PlainPerPixelProcessing (const PlainPerPixelProcessing &) | |
Protected Attributes | |
bool | basicInit_ |
BIAS::glfBatch | batch_ |
BIAS::glfDepthBufferMode | depthTest_ |
BIAS::glfElementBuffer | elements_ |
bool | externalUniformsChanged_ |
bool | flipTexCoord_ |
BIAS::glfShader | fragmentShader_ |
bool | initialized_ |
BIAS::glfMatrix | ModelViewMatrix_ |
unsigned int | numInputTextures_ |
BIAS::glfMatrix | ProjectionMatrix_ |
std::vector< std::string > | samplerNames_ |
BIAS::glfShaderProgram | shaderProgram_ |
std::map< std::string, float > | uniformsFloat_ |
std::map< std::string, int > | uniformsInt_ |
BIAS::glfVertexBuffer | vertices_ |
BIAS::glfViewport | viewport_ |
Class rendering quad and executing a fragment shader.
Definition at line 42 of file PlainPerPixelProcessing.hh.
PlainPerPixelProcessing::PlainPerPixelProcessing | ( | bool | flip = false | ) |
Definition at line 33 of file PlainPerPixelProcessing.cpp.
|
inlineprotected |
Definition at line 130 of file PlainPerPixelProcessing.hh.
void PlainPerPixelProcessing::Execute | ( | ) |
Definition at line 117 of file PlainPerPixelProcessing.cpp.
References batch_, BIAS::glfBatch::Draw(), externalUniformsChanged_, Init_(), initialized_, BIAS::glfShaderProgram::SetUniform(), shaderProgram_, uniformsFloat_, and uniformsInt_.
glfDepthBufferMode & PlainPerPixelProcessing::GetDepthBufferMode | ( | ) |
Definition at line 326 of file PlainPerPixelProcessing.cpp.
References depthTest_.
|
protected |
Definition at line 144 of file PlainPerPixelProcessing.cpp.
References basicInit_, externalUniformsChanged_, BIAS::glfViewport::GetHeight(), BIAS::glfViewport::GetWidth(), InitBatch_(), InitPrimitiveData_(), InitShaders_(), InitVertexTransformation_(), BIAS::glfShaderProgram::Link(), BIAS::glfUniformNotFoundException::NotFoundUniform(), numInputTextures_, samplerNames_, BIAS::glfShaderProgram::SetUniform(), shaderProgram_, and viewport_.
Referenced by Execute().
|
protected |
Definition at line 261 of file PlainPerPixelProcessing.cpp.
References batch_, depthTest_, elements_, ModelViewMatrix_, ProjectionMatrix_, BIAS::glfBatch::SetDepthBufferMode(), BIAS::glfBatch::SetElementBuffer(), BIAS::glfBatch::SetModelViewMatrix(), BIAS::glfBatch::SetProjectionMatrix(), BIAS::glfBatch::SetShaderProgram(), BIAS::glfBatch::SetVertexBuffer(), BIAS::glfBatch::SetViewport(), shaderProgram_, vertices_, and viewport_.
Referenced by Init_().
|
protected |
Definition at line 280 of file PlainPerPixelProcessing.cpp.
References elements_, flipTexCoord_, BIAS::Primitives::PlainQuad2DWithTexture2D(), and vertices_.
Referenced by Init_().
|
protected |
Definition at line 292 of file PlainPerPixelProcessing.cpp.
References BIAS::glfShaderProgram::AttachShader(), BIAS::glfShaderProgram::Create(), fragmentShader_, and shaderProgram_.
Referenced by Init_().
|
protected |
Definition at line 273 of file PlainPerPixelProcessing.cpp.
References BIAS::glfMatrix::MakeIdentity(), ModelViewMatrix_, and ProjectionMatrix_.
Referenced by Init_().
|
inlineprotected |
Definition at line 131 of file PlainPerPixelProcessing.hh.
void PlainPerPixelProcessing::ReleaseTextures | ( | ) |
Definition at line 40 of file PlainPerPixelProcessing.cpp.
References batch_, and BIAS::glfBatch::ReleaseTextures().
void PlainPerPixelProcessing::SetFlip | ( | bool | flip = true | ) |
Definition at line 137 of file PlainPerPixelProcessing.cpp.
References basicInit_, and flipTexCoord_.
void PlainPerPixelProcessing::SetFragmentShaderFromFile | ( | const std::string & | fileName | ) |
Definition at line 103 of file PlainPerPixelProcessing.cpp.
References BIAS::glfShader::CreateFromFile(), fragmentShader_, and initialized_.
void PlainPerPixelProcessing::SetFragmentShaderFromString | ( | const std::string & | source | ) |
Definition at line 110 of file PlainPerPixelProcessing.cpp.
References BIAS::glfShader::Create(), fragmentShader_, and initialized_.
void PlainPerPixelProcessing::SetOutputSize | ( | unsigned int | width, |
unsigned int | height | ||
) |
Returns the currently set texture set;.
Definition at line 89 of file PlainPerPixelProcessing.cpp.
References initialized_, BIAS::glfViewport::SetSize(), and viewport_.
void PlainPerPixelProcessing::SetRenderTarget | ( | BIAS::glfRenderTarget * | rt | ) |
Definition at line 97 of file PlainPerPixelProcessing.cpp.
References batch_, and BIAS::glfBatch::SetRenderTarget().
void PlainPerPixelProcessing::SetSamplerNames | ( | const std::vector< std::string > & | samplerNames | ) |
Definition at line 55 of file PlainPerPixelProcessing.cpp.
References initialized_, and samplerNames_.
void PlainPerPixelProcessing::SetTexture | ( | BIAS::glfTexture2D * | inputTexture | ) |
Definition at line 45 of file PlainPerPixelProcessing.cpp.
References batch_, initialized_, numInputTextures_, and BIAS::glfBatch::SetTexture().
void PlainPerPixelProcessing::SetTextures | ( | const std::vector< BIAS::glfTexture2D * > & | inputTextures | ) |
Adds textures in their respective index order and assigns them the default names img<index> in the shader programm.
Definition at line 62 of file PlainPerPixelProcessing.cpp.
References batch_, initialized_, numInputTextures_, and BIAS::glfBatch::SetTexture().
void PlainPerPixelProcessing::SetTextures | ( | std::list< BIAS::glfTexture2D * > & | inputTextures | ) |
Definition at line 73 of file PlainPerPixelProcessing.cpp.
References batch_, initialized_, numInputTextures_, and BIAS::glfBatch::SetTexture().
void PlainPerPixelProcessing::SetUniform | ( | const std::string & | name, |
float | val | ||
) |
Definition at line 311 of file PlainPerPixelProcessing.cpp.
References externalUniformsChanged_, and uniformsFloat_.
void PlainPerPixelProcessing::SetUniform | ( | const std::string & | name, |
int | val | ||
) |
Definition at line 318 of file PlainPerPixelProcessing.cpp.
References externalUniformsChanged_, and uniformsInt_.
|
protected |
Definition at line 105 of file PlainPerPixelProcessing.hh.
|
protected |
Definition at line 111 of file PlainPerPixelProcessing.hh.
Referenced by Execute(), InitBatch_(), ReleaseTextures(), SetRenderTarget(), SetTexture(), and SetTextures().
|
protected |
Definition at line 127 of file PlainPerPixelProcessing.hh.
Referenced by GetDepthBufferMode(), and InitBatch_().
|
protected |
Definition at line 115 of file PlainPerPixelProcessing.hh.
Referenced by InitBatch_(), and InitPrimitiveData_().
|
protected |
Definition at line 139 of file PlainPerPixelProcessing.hh.
Referenced by Execute(), Init_(), and SetUniform().
|
protected |
Definition at line 108 of file PlainPerPixelProcessing.hh.
Referenced by InitPrimitiveData_(), and SetFlip().
|
protected |
Definition at line 124 of file PlainPerPixelProcessing.hh.
Referenced by InitShaders_(), SetFragmentShaderFromFile(), and SetFragmentShaderFromString().
|
protected |
Definition at line 106 of file PlainPerPixelProcessing.hh.
Referenced by Execute(), SetFragmentShaderFromFile(), SetFragmentShaderFromString(), SetOutputSize(), SetSamplerNames(), SetTexture(), and SetTextures().
|
protected |
Definition at line 118 of file PlainPerPixelProcessing.hh.
Referenced by InitBatch_(), and InitVertexTransformation_().
|
protected |
Definition at line 107 of file PlainPerPixelProcessing.hh.
Referenced by Init_(), SetTexture(), and SetTextures().
|
protected |
Definition at line 119 of file PlainPerPixelProcessing.hh.
Referenced by InitBatch_(), and InitVertexTransformation_().
|
protected |
Definition at line 133 of file PlainPerPixelProcessing.hh.
Referenced by Init_(), and SetSamplerNames().
|
protected |
Definition at line 123 of file PlainPerPixelProcessing.hh.
Referenced by Execute(), Init_(), InitBatch_(), and InitShaders_().
|
protected |
Definition at line 140 of file PlainPerPixelProcessing.hh.
Referenced by Execute(), and SetUniform().
|
protected |
Definition at line 141 of file PlainPerPixelProcessing.hh.
Referenced by Execute(), and SetUniform().
|
protected |
Definition at line 114 of file PlainPerPixelProcessing.hh.
Referenced by InitBatch_(), and InitPrimitiveData_().
|
protected |
Definition at line 120 of file PlainPerPixelProcessing.hh.
Referenced by Init_(), InitBatch_(), and SetOutputSize().