Avoid calling expensive GLShader::setUniform overload
REVIEW: 111196
This commit is contained in:
parent
40acb1da14
commit
8f92e2ab91
3 changed files with 4 additions and 1 deletions
|
@ -352,7 +352,7 @@ void ColorCorrection::setupForOutput(int screen)
|
|||
d->m_ccTextureUnit = maxUnits - 1;
|
||||
}
|
||||
|
||||
if (!shader->setUniform("u_ccLookupTexture", d->m_ccTextureUnit)) {
|
||||
if (!shader->setUniform(GLShader::ColorCorrectionLookupTextureUnit, d->m_ccTextureUnit)) {
|
||||
kError(1212) << "unable to set uniform for the color correction lookup texture";
|
||||
d->m_hasError = true;
|
||||
emit errorOccured();
|
||||
|
|
|
@ -494,6 +494,8 @@ void GLShader::resolveLocations()
|
|||
|
||||
mFloatLocation[Saturation] = uniformLocation("saturation");
|
||||
|
||||
mIntLocation[ColorCorrectionLookupTextureUnit] = uniformLocation("u_ccLookupTexture");
|
||||
|
||||
mColorLocation[Color] = uniformLocation("geometryColor");
|
||||
|
||||
mLocationsResolved = true;
|
||||
|
|
|
@ -196,6 +196,7 @@ public:
|
|||
|
||||
enum IntUniform {
|
||||
AlphaToOne, ///< @deprecated no longer used
|
||||
ColorCorrectionLookupTextureUnit,
|
||||
IntUniformCount
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue