summaryrefslogtreecommitdiff
path: root/beryl-plugins/src/miniview.c
diff options
context:
space:
mode:
authorracarr <racarr@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-02-03 02:41:25 +0000
committerracarr <racarr@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-02-03 02:41:25 +0000
commit2b2555943c2f43b8b9c2846b06e43d400462bbe5 (patch)
treef67e53f0b22732bce9b826cb000e6590e6e87ab2 /beryl-plugins/src/miniview.c
parentb987cc28c8c1ed031001385f13c3afc3443bf70a (diff)
downloadmarex-dev-2b2555943c2f43b8b9c2846b06e43d400462bbe5.tar.gz
marex-dev-2b2555943c2f43b8b9c2846b06e43d400462bbe5.tar.bz2
Redo how expo mode works, now it works for vertical viewports
git-svn-id: file:///beryl/trunk@3601 d7aaf104-2d23-0410-ae22-9d23157bf5a3
Diffstat (limited to 'beryl-plugins/src/miniview.c')
-rw-r--r--beryl-plugins/src/miniview.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/beryl-plugins/src/miniview.c b/beryl-plugins/src/miniview.c
index 841828b..ca2e308 100644
--- a/beryl-plugins/src/miniview.c
+++ b/beryl-plugins/src/miniview.c
@@ -314,23 +314,32 @@ static void miniviewPaintTransformedScreen(CompScreen * s,
ms->expoCam += 0.075;
- glScalef(1.0f,1.0f,((float)s->hsize/2.0f)*ms->expoCam);
+ glScalef(1/((float)s->hsize/2),1/((float)s->vsize/2),1.0f);
- glTranslatef(-1.0f,0.0f,-0.8f);
+ glTranslatef(-0.25f*s->hsize,0.25f*s->vsize,-0.8f);
glRotatef(10,0.0f,1.0f,-0.0f);
+ glTranslatef(0.0f,0.0f,-0.2f);
+
int i;
- for (i = 0; i < s->hsize; i++)
+ int j;
+
+ for (j = 0; j < s->vsize; j++)
{
- (*s->paintTransformedScreen) (s, sAttrib,region, output, mask);
- glTranslatef((2.5/s->hsize),0.0f,0.0);
- glTranslatef(0.2f,0.0f,0.1f);
- moveScreenViewport(s,1,0,FALSE);
-
+ for (i = 0; i < s->hsize; i++)
+ {
+ (*s->paintTransformedScreen) (s, sAttrib,region, output, mask);
+ glTranslatef(1.0,0.0f,0.0);
+ moveScreenViewport(s,1,0,FALSE);
+ }
+ glTranslatef(-(s->hsize),-1.0f,0.0f);
+ moveScreenViewport(s,0,1,FALSE);
}
+
+
//while (s->x != origView)
// moveScreenViewport(s,1,0,FALSE);
s->filter[SCREEN_TRANS_FILTER] = oldFilter;