summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Kasprzyk <onestone@opencompositing.org>2007-12-19 12:23:12 +0100
committerDennis Kasprzyk <onestone@opencompositing.org>2007-12-19 12:23:12 +0100
commitb4ff70dc7d186011cd53aaf4b03087a8739072fc (patch)
tree3449706e4d972efad10cd353dab301ce03bdd07f
parentda2df3ca0f1267419740561fe61b422ba1d48cda (diff)
download3d-b4ff70dc7d186011cd53aaf4b03087a8739072fc.tar.gz
3d-b4ff70dc7d186011cd53aaf4b03087a8739072fc.tar.bz2
Reset cull face correctly.
-rw-r--r--3d.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/3d.c b/3d.c
index 18191dd..0d4ba60 100644
--- a/3d.c
+++ b/3d.c
@@ -230,7 +230,7 @@ tdPaintWindowWithDepth (CompWindow *w,
Bool wasCulled;
Bool status;
int wx, wy, ww, wh;
- int bevel;
+ int bevel, cull;
CompScreen *s = w->screen;
CompVector point, tPoint;
@@ -246,6 +246,8 @@ tdPaintWindowWithDepth (CompWindow *w,
bevel = tdGetBevel (s);
+ glGetIntegerv (GL_CULL_FACE_MODE, &cull);
+
if (ww && wh && !(mask & PAINT_WINDOW_OCCLUSION_DETECTION_MASK))
{
TD_WINDOW (w);
@@ -400,7 +402,7 @@ tdPaintWindowWithDepth (CompWindow *w,
WRAP (tds, s, paintWindow, tdPaintWindow);
}
- glCullFace (GL_BACK);
+ glCullFace (cull);
if (!wasCulled)
glDisable (GL_CULL_FACE);