From b027b57233a2a977ce5de3ed59f9a53a69418642 Mon Sep 17 00:00:00 2001 From: Rivo Laks Date: Fri, 13 Jul 2007 13:10:31 +0000 Subject: [PATCH] Shaders can now use cursorX and cursorY uniform variables svn path=/trunk/KDE/kdebase/workspace/; revision=687375 --- lib/kwinshadereffect.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/kwinshadereffect.cpp b/lib/kwinshadereffect.cpp index 5f1fa6a6d1..26f947952e 100644 --- a/lib/kwinshadereffect.cpp +++ b/lib/kwinshadereffect.cpp @@ -146,6 +146,8 @@ void ShaderEffect::postPaintScreen() // Use the shader mShader->bind(); mShader->setUniform("time", mTime); + mShader->setUniform("cursorX", (float)cursorPos().x()); + mShader->setUniform("cursorY", (float)cursorPos().y()); // Render fullscreen quad with screen contents glBegin(GL_QUADS);