-
Notifications
You must be signed in to change notification settings - Fork 0
/
AverageShaders.cpp
33 lines (30 loc) · 938 Bytes
/
AverageShaders.cpp
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
/**
* @file AverageShaders.h
* @author Dan R. Lipsa
* @date 25 Jul. 2010
*
* Implementation for the AverageShaders class
*
*/
#include "AverageShaders.h"
// StoreShaderProgram
// ======================================================================
StoreShaderProgram::StoreShaderProgram (const char* vert, const char* frag)
: ShaderProgram (vert, frag)
{
m_vValueLocation = attributeLocation("vValue");
}
// AddShaderProgram
// ======================================================================
AddShaderProgram::AddShaderProgram (const char* frag) :
ShaderProgram (0, frag)
{
m_previousTexUnitLocation = uniformLocation("previousTexUnit");
m_stepTexUnitLocation = uniformLocation("stepTexUnit");
}
void AddShaderProgram::Bind ()
{
ShaderProgram::Bind ();
setUniformValue (m_previousTexUnitLocation, GetPreviousTexUnit ());
setUniformValue (m_stepTexUnitLocation, GetStepTexUnit ());
}