TDME2  1.9.200
PostProcessingShaderImplementation.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
4 
5 #include <tdme/tdme.h>
6 #include <tdme/engine/fwd-tdme.h>
9 
10 using std::string;
11 
15 
16 /**
17  * Post processing shader program implementation interface
18  * @author Andreas Drewke
19  */
21 {
22 
23  /**
24  * Public destructor
25  */
27 
28  /**
29  * @return initialized and ready to be used
30  */
31  virtual bool isInitialized() = 0;
32 
33  /**
34  * Initialize post processing shader
35  */
36  virtual void initialize() = 0;
37 
38  /**
39  * Use program
40  * @param contextIdx context index
41  */
42  virtual void useProgram(int contextIdx) = 0;
43 
44  /**
45  * Unuse program
46  */
47  virtual void unUseProgram() = 0;
48 
49  /**
50  * Set source buffer pixel width
51  * @param contextIdx context index
52  * @param pixelWidth pixel width
53  */
54  virtual void setBufferPixelWidth(int contextIdx, float pixelWidth) = 0;
55 
56  /**
57  * Set source buffer pixel height
58  * @param contextIdx context index
59  * @param pixelHeight pixel height
60  */
61  virtual void setBufferPixelHeight(int contextIdx, float pixelHeight) = 0;
62 
63  /**
64  * Set shader parameters
65  * @param contextIdx context index
66  * @param engine engine
67  */
68  virtual void setShaderParameters(int contextIdx, Engine* engine) = 0;
69 
70  /**
71  * Unload textures
72  */
73  virtual void unloadTextures() = 0;
74 
75  /**
76  * Load textures
77  * @param pathName path name
78  */
79  virtual void loadTextures(const string& pathName) = 0;
80 };
Engine main class.
Definition: Engine.h:131
Frame buffer class.
Definition: FrameBuffer.h:22
virtual void loadTextures(const string &pathName)=0
Load textures.
virtual void setShaderParameters(int contextIdx, Engine *engine)=0
Set shader parameters.
virtual void setBufferPixelHeight(int contextIdx, float pixelHeight)=0
Set source buffer pixel height.
virtual void initialize()=0
Initialize post processing shader.
virtual void setBufferPixelWidth(int contextIdx, float pixelWidth)=0
Set source buffer pixel width.