From 4394219cd60bd805a03dcfa7a0d065ec1bd7e8c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=B6glund?= Date: Tue, 1 Apr 2014 18:09:31 +0200 Subject: [PATCH] cube: Always set the shader in WindowPaintData The cube effect was relying on paintWindow() using the generic shader without explicitly telling it to do so. This makes the cube effect work with dynamic shaders. --- effects/cube/cube.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/effects/cube/cube.cpp b/effects/cube/cube.cpp index 2bb1f2a600..e86341415c 100644 --- a/effects/cube/cube.cpp +++ b/effects/cube/cube.cpp @@ -1354,7 +1354,6 @@ void CubeEffect::paintWindow(EffectWindow* w, int mask, QRegion region, WindowPa if (stop) factor = timeLine.currentValue(); cylinderShader->setUniform("timeLine", factor); - data.shader = cylinderShader; currentShader = cylinderShader; } if (mode == Sphere) { @@ -1367,7 +1366,6 @@ void CubeEffect::paintWindow(EffectWindow* w, int mask, QRegion region, WindowPa if (stop) factor = timeLine.currentValue(); sphereShader->setUniform("timeLine", factor); - data.shader = sphereShader; currentShader = sphereShader; } if (reflectionPainting) { @@ -1375,6 +1373,7 @@ void CubeEffect::paintWindow(EffectWindow* w, int mask, QRegion region, WindowPa } else { currentShader->setUniform(GLShader::ScreenTransformation, m_rotationMatrix*origMatrix); } + data.shader = currentShader; } effects->paintWindow(w, mask, region, data); if (activated && cube_painting) {