cogl-clip-stack: Use orientation of the polygon to set clip planes
authorNeil Roberts <neil@linux.intel.com>
Tue, 20 Apr 2010 13:58:57 +0000 (14:58 +0100)
committerNeil Roberts <neil@linux.intel.com>
Wed, 21 Apr 2010 12:24:59 +0000 (13:24 +0100)
commitabc64a2c671a4eeafa374ceb91482e058705f6fb
tree6b3e833f30d67693db6f426de79be50d8ecab814
parent7f2b2e13641c146f4b62631ed89638aba610ae07
cogl-clip-stack: Use orientation of the polygon to set clip planes

Previously the clip stack code was trying to detect when the
orientation of the on-screen rectangle had changed by checking if the
order of the y-coordinates on the left edge was different from the
order the x-coordinates on the top edge. This doesn't work for some
rotations which was causing the clip planes to clip the wrong side of
the line. This patch makes it detect the orientation by calculating
the signed area which is a standard computer graphics algorithm.

http://bugzilla.openedhand.com/show_bug.cgi?id=2079
clutter/cogl/cogl/cogl-clip-stack.c