summaryrefslogtreecommitdiff
path: root/beryl-plugins/src/blurfx.c
diff options
context:
space:
mode:
authormaniac <maniac@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2006-11-28 17:30:23 +0000
committermaniac <maniac@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2006-11-28 17:30:23 +0000
commit33c1dd6a9fd871ca393583a3543e629b38860a70 (patch)
treece60c4d5f31fbce2f9d7c7bec85eaa170aab75c3 /beryl-plugins/src/blurfx.c
parentd32355e01401c8b2a782b3a182d8fc76312c944f (diff)
downloadmarex-dev-33c1dd6a9fd871ca393583a3543e629b38860a70.tar.gz
marex-dev-33c1dd6a9fd871ca393583a3543e629b38860a70.tar.bz2
blurfx plugin: correctly apply translation
git-svn-id: file:///beryl/trunk@1437 d7aaf104-2d23-0410-ae22-9d23157bf5a3
Diffstat (limited to 'beryl-plugins/src/blurfx.c')
-rw-r--r--beryl-plugins/src/blurfx.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/beryl-plugins/src/blurfx.c b/beryl-plugins/src/blurfx.c
index d5cc6b8..025d251 100644
--- a/beryl-plugins/src/blurfx.c
+++ b/beryl-plugins/src/blurfx.c
@@ -3492,7 +3492,9 @@ drawBlur (CompWindow * w, CompScreen * s, CompTexture * texture,
{
glTranslatef (w->attrib.x, w->attrib.y, 0.0f);
glScalef (attrib->xScale, attrib->yScale, 0.0f);
- glTranslatef (-w->attrib.x, -w->attrib.y, 0.0f);
+ glTranslatef (attrib->xTranslate / attrib->xScale - w->attrib.x,
+ attrib->yTranslate / attrib->yScale - w->attrib.y,
+ 0.0f);
}
// Do we have an decoration vertex array thet does not contain shadows?
@@ -3873,7 +3875,9 @@ drawReflection (CompWindow * w, CompScreen * s, CompTexture * texture,
{
glTranslatef (w->attrib.x, w->attrib.y, 0.0f);
glScalef (attrib->xScale, attrib->yScale, 0.0f);
- glTranslatef (-w->attrib.x, -w->attrib.y, 0.0f);
+ glTranslatef (attrib->xTranslate / attrib->xScale - w->attrib.x,
+ attrib->yTranslate / attrib->yScale - w->attrib.y,
+ 0.0f);
}
@@ -3983,7 +3987,9 @@ drawReflection (CompWindow * w, CompScreen * s, CompTexture * texture,
{
glTranslatef (w->attrib.x, w->attrib.y, 0.0f);
glScalef (attrib->xScale, attrib->yScale, 0.0f);
- glTranslatef (-w->attrib.x, -w->attrib.y, 0.0f);
+ glTranslatef (attrib->xTranslate / attrib->xScale - w->attrib.x,
+ attrib->yTranslate / attrib->yScale - w->attrib.y,
+ 0.0f);
}
glGetFloatv (GL_MODELVIEW_MATRIX, mvm);
glPopMatrix ();