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;
|
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";
|
kError(1212) << "unable to set uniform for the color correction lookup texture";
|
||||||
d->m_hasError = true;
|
d->m_hasError = true;
|
||||||
emit errorOccured();
|
emit errorOccured();
|
||||||
|
|
|
@ -494,6 +494,8 @@ void GLShader::resolveLocations()
|
||||||
|
|
||||||
mFloatLocation[Saturation] = uniformLocation("saturation");
|
mFloatLocation[Saturation] = uniformLocation("saturation");
|
||||||
|
|
||||||
|
mIntLocation[ColorCorrectionLookupTextureUnit] = uniformLocation("u_ccLookupTexture");
|
||||||
|
|
||||||
mColorLocation[Color] = uniformLocation("geometryColor");
|
mColorLocation[Color] = uniformLocation("geometryColor");
|
||||||
|
|
||||||
mLocationsResolved = true;
|
mLocationsResolved = true;
|
||||||
|
|
|
@ -196,6 +196,7 @@ public:
|
||||||
|
|
||||||
enum IntUniform {
|
enum IntUniform {
|
||||||
AlphaToOne, ///< @deprecated no longer used
|
AlphaToOne, ///< @deprecated no longer used
|
||||||
|
ColorCorrectionLookupTextureUnit,
|
||||||
IntUniformCount
|
IntUniformCount
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue