summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Kasprzyk <onestone@opencompositing.org>2007-11-22 05:58:25 +0100
committerDennis Kasprzyk <onestone@opencompositing.org>2007-11-22 05:58:25 +0100
commita9aa8d3c72be9e987d1020dd5238ccaa0e1e7ead (patch)
treef9f9216b0e42052b8e27db2c35aeaa5b00560b64
parentb29ebde3e4234a8ff00450eb16f29178060aedef (diff)
downloadatlantis-a9aa8d3c72be9e987d1020dd5238ccaa0e1e7ead.tar.gz
atlantis-a9aa8d3c72be9e987d1020dd5238ccaa0e1e7ead.tar.bz2
Flip face culling correctly to make it work with cubereflex.
-rw-r--r--atlantis.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/atlantis.c b/atlantis.c
index 7e2e3b8..e369b1b 100644
--- a/atlantis.c
+++ b/atlantis.c
@@ -325,11 +325,16 @@ static void atlantisPaintInside (CompScreen *s,
if (atlantisGetShowWater (s))
{
+ int cull;
+ glGetIntegerv (GL_CULL_FACE_MODE, &cull);
+
glEnable (GL_CULL_FACE);
- glCullFace (GL_FRONT);
+
+ glCullFace (~cull & (GL_FRONT | GL_BACK));
glColor4usv (atlantisGetWaterColor (s));
drawWater (as->water, TRUE, FALSE);
- glCullFace (GL_BACK);
+
+ glCullFace (cull);
}
if (atlantisGetShowGround (s))