TDME2 1.9.121
Public Member Functions | Private Attributes | List of all members
PostProcessingShader Class Referencefinal

Post processing shader. More...

#include <tdme/engine/subsystems/postprocessing/PostProcessingShader.h>

Collaboration diagram for PostProcessingShader:
Collaboration graph

Public Member Functions

 PostProcessingShader (Renderer *renderer)
 Public constructor. More...
 
 ~PostProcessingShader ()
 Public destructor. More...
 
bool isInitialized ()
 
void initialize ()
 Initialize renderer. More...
 
void useProgram ()
 Use program. More...
 
void unUseProgram ()
 Unuse program. More...
 
bool hasShader (const string &id)
 Has post processing shader. More...
 
void setShader (int contextIdx, const string &id)
 Set post processing shader. More...
 
void setBufferPixelWidth (int contextIdx, float pixelWidth)
 Set source buffer pixel width. More...
 
void setBufferPixelHeight (int contextIdx, float pixelHeight)
 Set source buffer pixel height. More...
 
void setShaderParameters (int contextIdx, Engine *engine)
 Set shader parameters. More...
 

Private Attributes

unordered_map< string, PostProcessingShaderImplementation * > shader
 
PostProcessingShaderImplementationimplementation { nullptr }
 
bool running { false }
 

Detailed Description

Post processing shader.

Author
Andreas Drewke
Version
$Id$

Definition at line 23 of file PostProcessingShader.h.

Constructor & Destructor Documentation

◆ PostProcessingShader()

PostProcessingShader ( Renderer renderer)

Public constructor.

Parameters
rendererrenderer

Definition at line 33 of file PostProcessingShader.cpp.

◆ ~PostProcessingShader()

Public destructor.

Definition at line 45 of file PostProcessingShader.cpp.

Member Function Documentation

◆ hasShader()

bool hasShader ( const string &  id)

Has post processing shader.

Parameters
idshader id
Returns
if shader exists and is initialized

Definition at line 82 of file PostProcessingShader.cpp.

◆ initialize()

void initialize ( )

Initialize renderer.

Definition at line 61 of file PostProcessingShader.cpp.

◆ isInitialized()

bool isInitialized ( )
Returns
initialized and ready to be used

Definition at line 52 of file PostProcessingShader.cpp.

◆ setBufferPixelHeight()

void setBufferPixelHeight ( int  contextIdx,
float  pixelHeight 
)

Set source buffer pixel height.

Parameters
contextIdxcontext index
pixelHeightpixel height

Definition at line 107 of file PostProcessingShader.cpp.

◆ setBufferPixelWidth()

void setBufferPixelWidth ( int  contextIdx,
float  pixelWidth 
)

Set source buffer pixel width.

Parameters
contextIdxcontext index
pixelWidthpixel width

Definition at line 102 of file PostProcessingShader.cpp.

◆ setShader()

void setShader ( int  contextIdx,
const string &  id 
)

Set post processing shader.

Parameters
contextIdxcontext index

Definition at line 86 of file PostProcessingShader.cpp.

◆ setShaderParameters()

void setShaderParameters ( int  contextIdx,
Engine engine 
)

Set shader parameters.

Parameters
engineengine

Definition at line 112 of file PostProcessingShader.cpp.

◆ unUseProgram()

void unUseProgram ( )

Unuse program.

Definition at line 73 of file PostProcessingShader.cpp.

◆ useProgram()

void useProgram ( )

Use program.

Definition at line 68 of file PostProcessingShader.cpp.

Member Data Documentation

◆ implementation

PostProcessingShaderImplementation* implementation { nullptr }
private

Definition at line 27 of file PostProcessingShader.h.

◆ running

bool running { false }
private

Definition at line 29 of file PostProcessingShader.h.

◆ shader

unordered_map<string, PostProcessingShaderImplementation*> shader
private

Definition at line 26 of file PostProcessingShader.h.


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