From 8d9321ca4c82d1113fb83009a52b2de8bb36590a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Fri, 27 Nov 2015 10:43:40 +0100 Subject: [PATCH] [effects] Use shader traits api in screenedge effect --- effects/screenedge/screenedgeeffect.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/effects/screenedge/screenedgeeffect.cpp b/effects/screenedge/screenedgeeffect.cpp index 3412d26291..09ae2891f0 100644 --- a/effects/screenedge/screenedgeeffect.cpp +++ b/effects/screenedge/screenedgeeffect.cpp @@ -98,9 +98,12 @@ void ScreenEdgeEffect::paintScreen(int mask, QRegion region, ScreenPaintData &da glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); texture->bind(); - ShaderBinder binder(ShaderManager::SimpleShader); + ShaderBinder binder(ShaderTrait::MapTexture | ShaderTrait::Modulate); const QVector4D constant(opacity, opacity, opacity, opacity); binder.shader()->setUniform(GLShader::ModulationConstant, constant); + QMatrix4x4 mvp = data.projectionMatrix(); + mvp.translate((*it)->geometry.x(), (*it)->geometry.y()); + binder.shader()->setUniform(GLShader::ModelViewProjectionMatrix, mvp); texture->render(infiniteRegion(), (*it)->geometry); texture->unbind(); glDisable(GL_BLEND);