TDME2 1.9.121
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PostProcessingProgram.h
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4#include <vector>
5
6#include <tdme/tdme.h>
9
10using std::string;
11using std::vector;
12
14
15/**
16 * Post processing program
17 * @author Andreas Drewke
18 * @version $Id$
19 */
21{
22 friend class PostProcessing;
23
24public:
28
29private:
35 bool useEZR;
38 int32_t renderTypes;
42 };
44 string shaderId;
49 };
51 vector<PostProcessingProgramEffectPass> effectPasses;
52 vector<PostProcessingProgramStep> steps;
53
54public:
55 /**
56 * Constructor
57 * @param renderPass render pass
58 */
60
61 /**
62 * Add effect pass
63 * @param effectPassIdx effect pass index
64 * @param frameBufferWidthDivideFactor frame buffer width divide factor
65 * @param frameBufferHeightDivideFactor frame buffer height divide factor
66 * @param shaderPrefix shader prefix
67 * @param useEZR use early Z rejection
68 * @param applyShadowMapping apply shadow mapping
69 * @param applyPostProcessing apply post processing
70 * @param renderTypes render types
71 * @param clearColor clear color
72 * @param renderLightSources render light sources
73 * @param skipOnLightSourceNotVisible skip on light source not visible
74 */
75 void addEffectPass(
76 int effectPassIdx,
77 int frameBufferWidthDivideFactor,
78 int frameBufferHeightDivideFactor,
79 string shaderPrefix,
80 bool useEZR,
81 bool applyShadowMapping,
82 bool applyPostProcessing,
83 int32_t renderTypes,
84 Color4 clearColor,
85 bool renderLightSources,
86 bool skipOnLightSourceNotVisible
87 );
88
89 /**
90 * @return effect passes
91 */
92 inline const vector<PostProcessingProgramEffectPass>& getEffectPasses() const {
93 return effectPasses;
94 }
95
96 /**
97 * Add step
98 * @param shaderId shader Id
99 * @param source source
100 * @param target target
101 * @param bindTemporary bind temporary
102 * @param blendToSource blend to source
103 */
105 string shaderId,
106 FrameBufferSource source,
107 FrameBufferTarget target,
108 bool bindTemporary = false,
110 );
111
112 /**
113 * @return render pass
114 */
115 inline const RenderPass getRenderPass() const {
116 return renderPass;
117 }
118
119 /**
120 * @return steps
121 */
122 inline const vector<PostProcessingProgramStep>& getPostProcessingSteps() const {
123 return steps;
124 }
125
126 /**
127 * Checks if program is supported
128 * @return if program is supported
129 */
130 bool isSupported();
131
132};
Color 4 definition.
Definition: Color4.h:20
void addEffectPass(int effectPassIdx, int frameBufferWidthDivideFactor, int frameBufferHeightDivideFactor, string shaderPrefix, bool useEZR, bool applyShadowMapping, bool applyPostProcessing, int32_t renderTypes, Color4 clearColor, bool renderLightSources, bool skipOnLightSourceNotVisible)
Add effect pass.
const vector< PostProcessingProgramStep > & getPostProcessingSteps() const
const vector< PostProcessingProgramEffectPass > & getEffectPasses() const
void addPostProcessingStep(string shaderId, FrameBufferSource source, FrameBufferTarget target, bool bindTemporary=false, FrameBufferSource blendToSource=FRAMEBUFFERSOURCE_NONE)
Add step.