From 588d97c2c7f8108e84fd2a32fdae071a4629d283 Mon Sep 17 00:00:00 2001 From: Robert Bragg Date: Thu, 2 Jun 2011 12:10:59 +0100 Subject: [PATCH] culling: Use vertex_count not '4' to determine partial culls We were mistakenly using the constant 4 to determine the number of vertices that need to be culled for a paint-volume to be considered fully culled too. This is only ok for 2d volumes and was resulting in some 3d volumes being considered culled whenever 4 out of 8 vertices were culled. This fix is simply to reference the vertex_count variable instead of assuming 4. --- clutter/clutter-paint-volume.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clutter/clutter-paint-volume.c b/clutter/clutter-paint-volume.c index 43e456276..5eea61b39 100644 --- a/clutter/clutter-paint-volume.c +++ b/clutter/clutter-paint-volume.c @@ -963,7 +963,7 @@ _clutter_paint_volume_cull (ClutterPaintVolume *pv, out++; } - if (out == 4) + if (out == vertex_count) return CLUTTER_CULL_RESULT_OUT; else if (out != 0) partial = TRUE;