summaryrefslogtreecommitdiff
path: root/3d.c
diff options
context:
space:
mode:
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);
}
}
}