(yes, I really do love this stuff :)

I spent a lot of time on the weekend looking into all the problems that have
been reported, and have discovered the source of the majority of these -
tess_clip.c is only slightly broken :)  I based my implementation of a
scanbeam approach to polygon clipping on the Generic Polygon Clipping
library, which had the basic stuff in there but didn't have the required
capabilities to do the winding rules.  I've added in the winding rule
operations, but it isn't as clean as I would have liked and I was planning
on rewriting it after 3.2 went out.

However, to fix the current bugs I will have to rework the whole clipping
part now rather than later.  An example of a case that is not handled at the
moment is:

                1 __5________8__ 4
                 |  |        |  |
                 |  |        |  |
                 | 6|________|7 |
                 |______________|
                2                3

The major change I added was to keep track of the original orientation of
the edges after they are broken up in the scanbeam table.  Now, I will have
to keep track of the winding number of the current region as I am clipping,
instead of calculating it after the contours are extracted, to correctly
handle cases like the one above.  This will make the whole process simpler
and should shorten the main clipping function considerably.

So, I'm working on this now.  I'm designing the new clipping algorithm at
the moment, and it should be cleaner and simpler than the current
implementation.  Thanks again for your patience, and I will keep you up to
date with my progress.  Things are a lot quiter for me now than over the
holiday period, so I should be able to devote a lot of time to fixing this
problem quickly.

-- Gareth

PS - Yes, my aim is to make the Mesa tessellator better than the SGI one (I
know of at least one case where the SGI tessellator fails).  And, it will be
good to have an open-source ANSI C implementation of the GLU tessellator.

==============================================
Gareth Hughes        mailto:[EMAIL PROTECTED]
Bell Labs Australia        ph: +61 2 9352 8608


_______________________________________________
Mesa-dev maillist  -  [EMAIL PROTECTED]
http://lists.mesa3d.org/mailman/listinfo/mesa-dev

Reply via email to