summaryrefslogtreecommitdiff
path: root/3d.c
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2007-09-17 21:09:55 +0200
committerDanny Baumann <dannybaumann@web.de>2007-09-17 21:09:55 +0200
commite81efe5e811278e00cfda62dcf683dad4867053e (patch)
tree27f0f2e411fc0d4edffbb9d65194564cc5e9a092 /3d.c
parent4a2d83d0e3d5e9a2072e122146851ec5e81854f2 (diff)
download3d-e81efe5e811278e00cfda62dcf683dad4867053e.tar.gz
3d-e81efe5e811278e00cfda62dcf683dad4867053e.tar.bz2
Remove clip planes hack.
Diffstat (limited to '3d.c')
-rw-r--r--3d.c44
1 files changed, 3 insertions, 41 deletions
diff --git a/3d.c b/3d.c
index cb2ae95..f9e0e6c 100644
--- a/3d.c
+++ b/3d.c
@@ -642,57 +642,19 @@ tdPaintTransformedOutput (CompScreen *s,
tds->maxDepth));
(*s->applyScreenTransform) (s, sAttrib, output, &mTransform);
-
-#if 0
- //(*s->enableOutputClipping) (s, &mTransform, region, output);
-#else
- GLdouble h = s->height;
-
- GLdouble p1[2] = { region->extents.x1, h - region->extents.y2 };
- GLdouble p2[2] = { region->extents.x2, h - region->extents.y1 };
-
- GLdouble halfW = output->width / 2.0;
- GLdouble halfH = output->height / 2.0;
-
- GLdouble cx = output->region.extents.x1 + halfW;
- GLdouble cy = (h - output->region.extents.y2) + halfH;
-
- GLdouble top[4] = { 0.0, halfH / (cy - p1[1]), 0.0, 0.5 };
- GLdouble bottom[4] = { 0.0, halfH / (cy - p2[1]), 0.0, 0.5 };
- GLdouble left[4] = { halfW / (cx - p1[0]), 0.0, 0.0, 0.5 };
- GLdouble right[4] = { halfW / (cx - p2[0]), 0.0, 0.0, 0.5 };
-
- glPushMatrix ();
- glLoadMatrixf (mTransform.m);
-
- glClipPlane (GL_CLIP_PLANE0, top);
- glClipPlane (GL_CLIP_PLANE1, bottom);
- glClipPlane (GL_CLIP_PLANE2, left);
- glClipPlane (GL_CLIP_PLANE3, right);
-
- glEnable (GL_CLIP_PLANE0);
- glEnable (GL_CLIP_PLANE1);
- glEnable (GL_CLIP_PLANE2);
- glEnable (GL_CLIP_PLANE3);
-#endif
+ (*s->enableOutputClipping) (s, &mTransform, region, output);
transformToScreenSpace (s, output, -sAttrib->zTranslate,
&mTransform);
+ glPushMatrix ();
glLoadMatrixf (mTransform.m);
(*s->paintWindow) (w, &w->paint, &mTransform, &infiniteRegion,
PAINT_WINDOW_ON_TRANSFORMED_SCREEN_MASK);
glPopMatrix ();
-#if 0
- //(*s->disableOutputClipping) (s);
-#else
- glDisable (GL_CLIP_PLANE0);
- glDisable (GL_CLIP_PLANE1);
- glDisable (GL_CLIP_PLANE2);
- glDisable (GL_CLIP_PLANE3);
-#endif
+ (*s->disableOutputClipping) (s);
}
}
}