[fusion-commits] Expo plugin: Changes to 'master' (47f892c40290311bea66d062eda33258c91a64e3)
onestone at server.opencompositing.org
onestone at server.opencompositing.org
Fri May 2 16:37:42 CEST 2008
New commits:
commit 47f892c40290311bea66d062eda33258c91a64e3
Author: Dennis Kasprzyk <onestone at opencompositing.org>
Date: Fri May 2 16:38:16 2008 +0200
We have to scale the normal, because we are also scaling in z direction.
expo.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
Modified: fusion/plugins/expo/expo.c
===================================================================
--- fusion/plugins/expo/expo.c
+++ fusion/plugins/expo/expo.c
@@ -918,6 +918,7 @@ expoPaintWall (CompScreen *s,
/* zoom out */
oScale = DEFAULT_Z_CAMERA / (camZ + DEFAULT_Z_CAMERA);
matrixScale (&sTransform, oScale, oScale, oScale);
+ glNormal3f (0.0, 0.0, -oScale);
matrixTranslate (&sTransform, -camX, -camY, -camZ - DEFAULT_Z_CAMERA);
@@ -1063,6 +1064,8 @@ expoPaintWall (CompScreen *s,
matrixTranslate (&sTransform, 0, - ((1.0 * sy) + gapY), 0.0f);
}
+ glNormal3f (0.0, 0.0, -1.0);
+
if (reflection)
{
glEnable (GL_BLEND);
@@ -1423,10 +1426,11 @@ expoDrawWindowTexture (CompWindow *w,
glNormal3f (0.0, 0.0, -1.0);
return;
}
-
+glEnable (GL_NORMALIZE);
UNWRAP (es, s, drawWindowTexture);
(*s->drawWindowTexture) (w, texture, attrib, mask);
WRAP (es, s, drawWindowTexture, expoDrawWindowTexture);
+ glDisable (GL_NORMALIZE);
}
static Bool
More information about the commits
mailing list