[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-dev] Questions about trapezoids, triangle stripper etc.
From: |
Udo Giacomozzi |
Subject: |
[Gnash-dev] Questions about trapezoids, triangle stripper etc. |
Date: |
Wed, 13 Sep 2006 19:49:08 +0200 |
Hi again.
Ok, things are getting clearer now. I studied everything and came now
to the tesselator part.
AFAIK, curves and lines are loaded into a list of "edges" which then
are either passed as "line strips" to the renderer (in the case of an
outline) or mangled through the tesselator if it is a filled shape.
BTW, straight lines seem to be converted to curves where the control
point equals the new anchor point (resulting a straight line on
screen). That explains why simple straight lines are drawn in pieces
of different length. This could be optimized, I'd say...
Back to my question:
The outline mesh is passed to the "tesselator", which seems to
generate a list of trapezoids that together form the correct
fill for the shape, correct? These trapezoids have parallel upper and
lower sides, and probably they perfectly horizontal on the screen.
Ok, these trapezoids are then split to two triangles via the
"tri_stripper". I guess this is to support accelerated hardware?
Anyway, in the end we probably have a bunch of triangles that form the
shape (and are passed to the backend).
Now, we would like to bypass the tesselator completely and let the
backend draw the original shape itself (based on straight lines is
ok). The reason is that these triangles (the shape) look awful when
rendered through AGG. This may be because of the anti-aliasing or
because AGG does some intersection computing. Anyway, one can clearly
recognize those triangles when a simple rectangle should be displayed.
Anyway, I'd like to learn more about the tesselator because it's the
missing piece in my Gnash puzzle.
I hope someone can answer any of these questions:
- What's the true story behind the tesselator and the trapezoids? I
admit I don't know anything about filling algorithms theory.
- Are the triangles really just two pieces of the trapezoids? I ask
because the "tri_stripper" is implemented rather complicated for
such a simple task. Apparently the order of the triangles follow
some logic?
- What do the arguments passed to add_trapezoid() exactly mean?
- Is all this tesselator/trapezoid/triangle stuff used *only* for
rendering or has it an additional uses, for example collision
detection? With other words: Would it be safe to disable it
altogether?
Looking forward for any hint,
Udo
- [Gnash-dev] Questions about trapezoids, triangle stripper etc.,
Udo Giacomozzi <=
- Re: [Gnash-dev] Questions about trapezoids, triangle stripper etc., strk, 2006/09/18
- Re[2]: [Gnash-dev] Questions about trapezoids, triangle stripper etc., Udo Giacomozzi, 2006/09/18
- Re: [Gnash-dev] Questions about trapezoids, triangle stripper etc., strk, 2006/09/19
- Re[2]: [Gnash-dev] Questions about trapezoids, triangle stripper etc., Udo Giacomozzi, 2006/09/19
- Re: [Gnash-dev] Questions about trapezoids, triangle stripper etc., strk, 2006/09/20
- Re: [Gnash-dev] Questions about trapezoids, triangle stripper etc., strk, 2006/09/20
- Re[2]: [Gnash-dev] Questions about trapezoids, triangle stripper etc., Udo Giacomozzi, 2006/09/21
- Re: [Gnash-dev] Questions about trapezoids, triangle stripper etc., strk, 2006/09/25
- Re[2]: [Gnash-dev] Questions about trapezoids, triangle stripper etc., Udo Giacomozzi, 2006/09/25
- Re: [Gnash-dev] Questions about trapezoids, triangle stripper etc., strk, 2006/09/25