From 7facdb67ee5b71ef1edef3777c31620bb486f863 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Fri, 27 Nov 2015 12:26:16 +0100 Subject: [PATCH] [effects] Simplify setting mvp matrix for cursor in zoom effect Now that we pass the projection matrix with screen paint data we don't need to calculate our own matrix. --- effects/zoom/zoom.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/effects/zoom/zoom.cpp b/effects/zoom/zoom.cpp index b5cac9c21e..79840be1b8 100644 --- a/effects/zoom/zoom.cpp +++ b/effects/zoom/zoom.cpp @@ -359,9 +359,7 @@ void ZoomEffect::paintScreen(int mask, QRegion region, ScreenPaintData& data) glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); auto s = ShaderManager::instance()->pushShader(ShaderTrait::MapTexture); - QMatrix4x4 mvp; - const QSize size = effects->virtualScreenSize(); - mvp.ortho(0, size.width(), size.height(), 0, 0, 65535); + QMatrix4x4 mvp = data.projectionMatrix(); mvp.translate(rect.x(), rect.y()); s->setUniform(GLShader::ModelViewProjectionMatrix, mvp); texture->render(region, rect);