From 5e47d41f7b81d0cf31272ae8af4ccb2a32a53a9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Fri, 9 Jan 2015 08:28:46 +0100 Subject: [PATCH] [effects/startupfeedback] Use dedicated shader for bouncing cursor BUG: 342203 REVIEW: 121941 --- effects/startupfeedback/startupfeedback.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/effects/startupfeedback/startupfeedback.cpp b/effects/startupfeedback/startupfeedback.cpp index bc87ee89f5..f8d4c607cf 100644 --- a/effects/startupfeedback/startupfeedback.cpp +++ b/effects/startupfeedback/startupfeedback.cpp @@ -197,7 +197,12 @@ void StartupFeedbackEffect::paintScreen(int mask, QRegion region, ScreenPaintDat } } else { 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); if (useShader) {