Commit 588d97c2 authored by Robert Bragg's avatar Robert Bragg

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.
parent ba8cc8e0
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment