Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
BIAS::PlainPerPixelProcessing Class Reference

Class rendering quad and executing a fragment shader. More...

#include <OpenGLFramework/SpecializedBatches/PlainPerPixelProcessing.hh>

+ Collaboration diagram for BIAS::PlainPerPixelProcessing:

Public Member Functions

void Execute ()
 
glfDepthBufferModeGetDepthBufferMode ()
 
 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_ ()
 
PlainPerPixelProcessingoperator= (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_
 

Detailed Description

Class rendering quad and executing a fragment shader.

Attention
Do not use any class function without valid context!
Author
bartczak
Examples:
ExamplePlainPerPixelProcessing.cpp.

Definition at line 42 of file PlainPerPixelProcessing.hh.

Constructor & Destructor Documentation

PlainPerPixelProcessing::PlainPerPixelProcessing ( bool  flip = false)

Definition at line 33 of file PlainPerPixelProcessing.cpp.

BIAS::PlainPerPixelProcessing::PlainPerPixelProcessing ( const PlainPerPixelProcessing )
inlineprotected

Definition at line 130 of file PlainPerPixelProcessing.hh.

Member Function Documentation

void PlainPerPixelProcessing::Execute ( )
glfDepthBufferMode & PlainPerPixelProcessing::GetDepthBufferMode ( )

Definition at line 326 of file PlainPerPixelProcessing.cpp.

References depthTest_.

void PlainPerPixelProcessing::Init_ ( )
protected
void PlainPerPixelProcessing::InitBatch_ ( )
protected
void PlainPerPixelProcessing::InitPrimitiveData_ ( )
protected
void PlainPerPixelProcessing::InitShaders_ ( )
protected
void PlainPerPixelProcessing::InitVertexTransformation_ ( )
protected

Definition at line 273 of file PlainPerPixelProcessing.cpp.

References BIAS::glfMatrix::MakeIdentity(), ModelViewMatrix_, and ProjectionMatrix_.

Referenced by Init_().

PlainPerPixelProcessing& BIAS::PlainPerPixelProcessing::operator= ( const PlainPerPixelProcessing )
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)
void PlainPerPixelProcessing::SetFragmentShaderFromString ( const std::string &  source)
void PlainPerPixelProcessing::SetOutputSize ( unsigned int  width,
unsigned int  height 
)

Returns the currently set texture set;.

Deprecated:
use SwapGLObjects instead
Deprecated:
use SwapGLObjects instead
Deprecated:
use SwapGLObjects instead
Deprecated:
use SwapGLObjects instead
Deprecated:
use SwapGLObjects instead
Deprecated:
use SwapGLObjects instead
Deprecated:
use SwapGLObjects instead
Examples:
ExamplePlainPerPixelProcessing.cpp.

Definition at line 89 of file PlainPerPixelProcessing.cpp.

References initialized_, BIAS::glfViewport::SetSize(), and viewport_.

void PlainPerPixelProcessing::SetRenderTarget ( BIAS::glfRenderTarget rt)
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)
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.

Attention
Will relink the programm so all uniforms set directly on the program (GetProgram()) will have to be set again!
Examples:
ExamplePlainPerPixelProcessing.cpp.

Definition at line 62 of file PlainPerPixelProcessing.cpp.

References batch_, initialized_, numInputTextures_, and BIAS::glfBatch::SetTexture().

void PlainPerPixelProcessing::SetTextures ( std::list< BIAS::glfTexture2D * > &  inputTextures)
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_.

Member Data Documentation

bool BIAS::PlainPerPixelProcessing::basicInit_
protected

Definition at line 105 of file PlainPerPixelProcessing.hh.

Referenced by Init_(), and SetFlip().

BIAS::glfBatch BIAS::PlainPerPixelProcessing::batch_
protected
BIAS::glfDepthBufferMode BIAS::PlainPerPixelProcessing::depthTest_
protected

Definition at line 127 of file PlainPerPixelProcessing.hh.

Referenced by GetDepthBufferMode(), and InitBatch_().

BIAS::glfElementBuffer BIAS::PlainPerPixelProcessing::elements_
protected

Definition at line 115 of file PlainPerPixelProcessing.hh.

Referenced by InitBatch_(), and InitPrimitiveData_().

bool BIAS::PlainPerPixelProcessing::externalUniformsChanged_
protected

Definition at line 139 of file PlainPerPixelProcessing.hh.

Referenced by Execute(), Init_(), and SetUniform().

bool BIAS::PlainPerPixelProcessing::flipTexCoord_
protected

Definition at line 108 of file PlainPerPixelProcessing.hh.

Referenced by InitPrimitiveData_(), and SetFlip().

BIAS::glfShader BIAS::PlainPerPixelProcessing::fragmentShader_
protected
bool BIAS::PlainPerPixelProcessing::initialized_
protected
BIAS::glfMatrix BIAS::PlainPerPixelProcessing::ModelViewMatrix_
protected

Definition at line 118 of file PlainPerPixelProcessing.hh.

Referenced by InitBatch_(), and InitVertexTransformation_().

unsigned int BIAS::PlainPerPixelProcessing::numInputTextures_
protected

Definition at line 107 of file PlainPerPixelProcessing.hh.

Referenced by Init_(), SetTexture(), and SetTextures().

BIAS::glfMatrix BIAS::PlainPerPixelProcessing::ProjectionMatrix_
protected

Definition at line 119 of file PlainPerPixelProcessing.hh.

Referenced by InitBatch_(), and InitVertexTransformation_().

std::vector<std::string> BIAS::PlainPerPixelProcessing::samplerNames_
protected

Definition at line 133 of file PlainPerPixelProcessing.hh.

Referenced by Init_(), and SetSamplerNames().

BIAS::glfShaderProgram BIAS::PlainPerPixelProcessing::shaderProgram_
protected

Definition at line 123 of file PlainPerPixelProcessing.hh.

Referenced by Execute(), Init_(), InitBatch_(), and InitShaders_().

std::map<std::string, float> BIAS::PlainPerPixelProcessing::uniformsFloat_
protected

Definition at line 140 of file PlainPerPixelProcessing.hh.

Referenced by Execute(), and SetUniform().

std::map<std::string, int> BIAS::PlainPerPixelProcessing::uniformsInt_
protected

Definition at line 141 of file PlainPerPixelProcessing.hh.

Referenced by Execute(), and SetUniform().

BIAS::glfVertexBuffer BIAS::PlainPerPixelProcessing::vertices_
protected

Definition at line 114 of file PlainPerPixelProcessing.hh.

Referenced by InitBatch_(), and InitPrimitiveData_().

BIAS::glfViewport BIAS::PlainPerPixelProcessing::viewport_
protected

Definition at line 120 of file PlainPerPixelProcessing.hh.

Referenced by Init_(), InitBatch_(), and SetOutputSize().


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