-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAverageShaders.h
More file actions
56 lines (48 loc) · 1.01 KB
/
Copy pathAverageShaders.h
File metadata and controls
56 lines (48 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/**
* @file AverageShaders.h
* @author Dan R. Lipsa
* @date 25 Jul. 2011
* @ingroup average
* @brief Shaders used for computing a pixel-based time-average of attributes.
*/
#ifndef __AVERAGE_SHADERS_H__
#define __AVERAGE_SHADERS_H__
#include "ShaderProgram.h"
/**
* @brief Shader used to store attribute values into the graphics card.
*/
class StoreShaderProgram : public ShaderProgram
{
public:
StoreShaderProgram (const char* vert, const char* frag);
int GetVValueLocation () const
{
return m_vValueLocation;
}
private:
int m_vValueLocation;
};
/**
* @brief Shader used for the summation step in computing the average.
*/
class AddShaderProgram : public ShaderProgram
{
public:
AddShaderProgram (const char* frag);
void Bind ();
GLint GetPreviousTexUnit ()
{
return 1;
}
GLint GetStepTexUnit ()
{
return 2;
}
protected:
int m_previousTexUnitLocation;
int m_stepTexUnitLocation;
};
#endif //__AVERAGE_SHADERS_H__
// Local Variables:
// mode: c++
// End: