summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoi Cohen <roico@roico-desktop.(none)>2007-07-03 19:04:14 +0300
committerRoi Cohen <roico@roico-desktop.(none)>2007-07-03 19:04:14 +0300
commitfe8598b8f8fb90f445ee95c9cc0aa0aec6afc09d (patch)
tree30b76a0e8d9639e19a75eac371f7a35a809f716c
parent4b6143d85e80bada36575d3f2a403aca3657b468 (diff)
download3d-fe8598b8f8fb90f445ee95c9cc0aa0aec6afc09d.tar.gz
3d-fe8598b8f8fb90f445ee95c9cc0aa0aec6afc09d.tar.bz2
fix windows in 2 different viewports - needs the clip planes patch
-rw-r--r--3d.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/3d.c b/3d.c
index ffd054e..6ab1336 100644
--- a/3d.c
+++ b/3d.c
@@ -997,7 +997,12 @@ static Bool tdInitScreen(CompPlugin * p, CompScreen * s)
tds->currentScreenNum = s->nOutputDev;
tds->currentDifferentResolutions = differentResolutions(s);
- tds->xMove = 0.0f;
+ if (tds->currentViewportNum > 2
+ && (s->nOutputDev == 1))
+ tds->xMove =
+ 1.0f / (tan (PI * (tds->currentViewportNum - 2.0f) / (2.0f * tds->currentViewportNum)));
+ else
+ tds->xMove = 0.0f;
tds->lastInViewportList = NULL;
tds->lastInViewportListSize = 0;