diff --git a/lib/kwinglutils.cpp b/lib/kwinglutils.cpp index 8ab363f5cf..8b1311b0b5 100644 --- a/lib/kwinglutils.cpp +++ b/lib/kwinglutils.cpp @@ -525,7 +525,10 @@ void GLTexture::render( QRegion region, const QRect& rect, bool useShader ) m_vbo->setData( 4, 2, verts, texcoords ); } if (useShader) { - // TODO: set shader translation. + GLint currentProgram; + glGetIntegerv( GL_CURRENT_PROGRAM, ¤tProgram ); + GLint location = glGetUniformLocation(currentProgram, "geometry"); + glUniform4f(location, rect.x(), rect.y(), 0.0f, 0.0f); } else { #ifndef KWIN_HAVE_OPENGLES glTranslatef( rect.x(), rect.y(), 0.0f ); diff --git a/scene_opengl.cpp b/scene_opengl.cpp index 7e0aab13dc..7ed965a042 100644 --- a/scene_opengl.cpp +++ b/scene_opengl.cpp @@ -1362,7 +1362,7 @@ void SceneOpenGL::EffectFrame::render( QRegion region, double opacity, double fr m_unstyledTexture->bind(); const QPoint pt = m_effectFrame->geometry().topLeft(); if (sceneShader) { - // TODO: move geometry + shader->setUniform("geometry", QVector4D(pt.x(), pt.y(), 0.0f, 0.0f)); } else { #ifndef KWIN_HAVE_OPENGLES glTranslatef( pt.x(), pt.y(), 0.0f );