Reset shader state in TrackMouse effect prior to render it
The Shader might have left-overs from last usage which might cause the effect to not work properly. BUG: 304404 FIXED-IN: 4.9.1 Reviewed By: Thomas Lübking
This commit is contained in:
parent
fb01e4ab8c
commit
74fe348b96
1 changed files with 5 additions and 2 deletions
|
@ -138,9 +138,12 @@ void TrackMouseEffect::paintScreen(int mask, QRegion region, ScreenPaintData& da
|
||||||
matrix.translate(p.x(), p.y(), 0.0);
|
matrix.translate(p.x(), p.y(), 0.0);
|
||||||
matrix.rotate(i ? -2*m_angle : m_angle, 0, 0, 1.0);
|
matrix.rotate(i ? -2*m_angle : m_angle, 0, 0, 1.0);
|
||||||
matrix.translate(-p.x(), -p.y(), 0.0);
|
matrix.translate(-p.x(), -p.y(), 0.0);
|
||||||
if (shader)
|
if (shader) {
|
||||||
shader->setUniform(GLShader::ModelViewMatrix, matrix);
|
shader->setUniform(GLShader::ModelViewMatrix, matrix);
|
||||||
else
|
shader->setUniform(GLShader::Saturation, 1.0);
|
||||||
|
shader->setUniform(GLShader::ModulationConstant, QVector4D(1.0, 1.0, 1.0, 1.0));
|
||||||
|
shader->setUniform(GLShader::AlphaToOne, 0);
|
||||||
|
} else
|
||||||
pushMatrix(matrix);
|
pushMatrix(matrix);
|
||||||
m_texture[i]->bind();
|
m_texture[i]->bind();
|
||||||
m_texture[i]->render(region, m_lastRect[i]);
|
m_texture[i]->render(region, m_lastRect[i]);
|
||||||
|
|
Loading…
Reference in a new issue