[effects/startupfeedback] Use dedicated shader for bouncing cursor

BUG: 342203
REVIEW: 121941
This commit is contained in:
Martin Gräßlin 2015-01-09 08:28:46 +01:00
parent 4963bf3d44
commit 5e47d41f7b

View file

@ -197,7 +197,12 @@ void StartupFeedbackEffect::paintScreen(int mask, QRegion region, ScreenPaintDat
} }
} else { } else {
useShader = true; useShader = true;
ShaderManager::instance()->pushShader(ShaderManager::SimpleShader); auto s = ShaderManager::instance()->pushShader(ShaderTrait::MapTexture);
QMatrix4x4 mvp;
const QSize size = effects->virtualScreenSize();
mvp.ortho(0, size.width(), size.height(), 0, 0, 65535);
mvp.translate(m_currentGeometry.x(), m_currentGeometry.y());
s->setUniform(GLShader::ModelViewProjectionMatrix, mvp);
} }
texture->render(m_currentGeometry, m_currentGeometry); texture->render(m_currentGeometry, m_currentGeometry);
if (useShader) { if (useShader) {